| Index: chrome/browser/ui/webui/ntp/foreign_session_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
|
| index 1e2066664aec9210969c2be454545a43d0f92c4e..fbcade5defbf8acb56288915ef1770530913c1f8 100644
|
| --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc
|
| @@ -74,12 +74,11 @@ void ForeignSessionHandler::RegisterMessages() {
|
| }
|
|
|
| void ForeignSessionHandler::Init() {
|
| - // TODO(dubroy): Change this to only observe this notification on the current
|
| - // profile, rather than all sources (crbug.com/124717).
|
| - registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
|
| - content::NotificationService::AllSources());
|
| -
|
| Profile* profile = Profile::FromWebUI(web_ui());
|
| + ProfileSyncService* service =
|
| + ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
|
| + registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE,
|
| + content::Source<ProfileSyncService>(service));
|
| registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
|
| content::Source<Profile>(profile));
|
| registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED,
|
|
|