Chromium Code Reviews| 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 525915052568ccc294e689dabf01db327e6504f0..90d8b4260903133283e89a0745cdb8ccb9528894 100644 |
| --- a/chrome/browser/ui/webui/ntp/foreign_session_handler.cc |
| +++ b/chrome/browser/ui/webui/ntp/foreign_session_handler.cc |
| @@ -62,9 +62,10 @@ void ForeignSessionHandler::RegisterMessages() { |
| } |
| void ForeignSessionHandler::Init() { |
| - Profile* profile = Profile::FromWebUI(web_ui()); |
| registrar_.Add(this, chrome::NOTIFICATION_SYNC_CONFIGURE_DONE, |
| - content::Source<Profile>(profile)); |
| + content::NotificationService::AllSources()); |
|
Nicolas Zea
2012/04/23 18:18:52
This is going to listen to other profiles as well
|
| + |
| + Profile* profile = Profile::FromWebUI(web_ui()); |
| registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED, |
| content::Source<Profile>(profile)); |
| registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_DISABLED, |
| @@ -106,7 +107,7 @@ bool ForeignSessionHandler::IsTabSyncEnabled() { |
| Profile* profile = Profile::FromWebUI(web_ui()); |
| ProfileSyncService* service = |
| ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile); |
| - return service && service->GetSessionModelAssociator(); |
| + return service && service->GetPreferredDataTypes().Has(syncable::SESSIONS); |
| } |
| string16 ForeignSessionHandler::FormatSessionTime(const base::Time& time) { |