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:: |