summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc8
-rw-r--r--chrome/browser/automation/testing_automation_provider.h4
2 files changed, 5 insertions, 7 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 7e6ed0c..f62535d 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -4011,11 +4011,11 @@ void TestingAutomationProvider::OnRedirectQueryComplete(
void TestingAutomationProvider::OnBrowserAdded(const Browser* browser) {
}
-void TestingAutomationProvider::OnBrowserRemoving(const Browser* browser) {
+void TestingAutomationProvider::OnBrowserRemoved(const Browser* browser) {
// For backwards compatibility with the testing automation interface, we
// want the automation provider (and hence the process) to go away when the
// last browser goes away.
- if (BrowserList::size() == 1 && !CommandLine::ForCurrentProcess()->HasSwitch(
+ if (BrowserList::empty() && !CommandLine::ForCurrentProcess()->HasSwitch(
switches::kKeepAliveForTest)) {
// If you change this, update Observer for NotificationType::SESSION_END
// below.
@@ -4028,9 +4028,9 @@ void TestingAutomationProvider::Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details) {
DCHECK(type == NotificationType::SESSION_END);
- // OnBrowserRemoving does a ReleaseLater. When session end is received we exit
+ // OnBrowserRemoved does a ReleaseLater. When session end is received we exit
// before the task runs resulting in this object not being deleted. This
- // Release balance out the Release scheduled by OnBrowserRemoving.
+ // Release balance out the Release scheduled by OnBrowserRemoved.
Release();
}
diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h
index 715a89f..e0a505e 100644
--- a/chrome/browser/automation/testing_automation_provider.h
+++ b/chrome/browser/automation/testing_automation_provider.h
@@ -23,10 +23,8 @@ class TestingAutomationProvider : public AutomationProvider,
explicit TestingAutomationProvider(Profile* profile);
// BrowserList::Observer implementation
- // Called immediately after a browser is added to the list
virtual void OnBrowserAdded(const Browser* browser);
- // Called immediately before a browser is removed from the list
- virtual void OnBrowserRemoving(const Browser* browser);
+ virtual void OnBrowserRemoved(const Browser* browser);
// IPC implementations
virtual void OnMessageReceived(const IPC::Message& msg);