Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9424)

Unified Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 7639002: Profiles: BROWSER_OPENED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Same code; another round to see if flake Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_provider_observers.cc
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index 61dfc6a133bd5aff032ecf22682a36b9298f7b9e..bfa293b1a7a56cc8ea176772b8a8512528f09cc6 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -160,10 +160,11 @@ void InitialLoadObserver::ConditionMet() {
automation_->OnInitialTabLoadsComplete();
}
-NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation)
+NewTabUILoadObserver::NewTabUILoadObserver(AutomationProvider* automation,
+ Profile* profile)
: automation_(automation->AsWeakPtr()) {
registrar_.Add(this, chrome::NOTIFICATION_INITIAL_NEW_TAB_UI_LOAD,
- NotificationService::AllSources());
+ Source<Profile>(profile));
}
NewTabUILoadObserver::~NewTabUILoadObserver() {
@@ -763,9 +764,9 @@ BrowserOpenedNotificationObserver::BrowserOpenedNotificationObserver(
new_window_id_(extension_misc::kUnknownWindowId),
for_browser_command_(false) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllSources());
+ NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
- NotificationService::AllSources());
+ NotificationService::AllBrowserContextsAndSources());
}
BrowserOpenedNotificationObserver::~BrowserOpenedNotificationObserver() {
@@ -859,9 +860,9 @@ BrowserCountChangeNotificationObserver::BrowserCountChangeNotificationObserver(
automation_(automation->AsWeakPtr()),
reply_message_(reply_message) {
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
- NotificationService::AllSources());
+ NotificationService::AllBrowserContextsAndSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
- NotificationService::AllSources());
+ NotificationService::AllBrowserContextsAndSources());
}
BrowserCountChangeNotificationObserver::
« no previous file with comments | « chrome/browser/automation/automation_provider_observers.h ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698