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

Unified Diff: chrome/browser/android/foreign_session_helper.cc

Issue 1406943004: [sync] Isolate FOREIGN_SESSION_UPDATED notification in ProfileSyncService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « chrome/browser/android/foreign_session_helper.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/foreign_session_helper.cc
diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc
index 058b196b344d9d218e3ab07389127278718e6067..c6a64428e047a71f948ae62356eec04d120fbcd7 100644
--- a/chrome/browser/android/foreign_session_helper.cc
+++ b/chrome/browser/android/foreign_session_helper.cc
@@ -158,9 +158,6 @@ ForeignSessionHelper::ForeignSessionHelper(Profile* profile)
// NOTE: The ProfileSyncService can be null in tests.
if (service)
scoped_observer_.Add(service);
-
- registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
- content::Source<Profile>(profile));
}
ForeignSessionHelper::~ForeignSessionHelper() {
@@ -198,19 +195,11 @@ void ForeignSessionHelper::FireForeignSessionCallback() {
Java_ForeignSessionCallback_onUpdated(env, callback_.obj());
}
-void ForeignSessionHelper::Observe(
- int type, const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED:
- FireForeignSessionCallback();
- break;
- default:
- NOTREACHED();
- }
+void ForeignSessionHelper::OnSyncConfigurationCompleted() {
+ FireForeignSessionCallback();
}
-void ForeignSessionHelper::OnSyncConfigurationCompleted() {
+void ForeignSessionHelper::OnForeignSessionUpdated() {
FireForeignSessionCallback();
}
« no previous file with comments | « chrome/browser/android/foreign_session_helper.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698