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

Unified Diff: chrome/browser/ui/webui/foreign_session_handler.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/ui/webui/foreign_session_handler.h ('k') | components/sync_driver/sync_service_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/foreign_session_handler.cc
diff --git a/chrome/browser/ui/webui/foreign_session_handler.cc b/chrome/browser/ui/webui/foreign_session_handler.cc
index 1337af9634f187b4e20a879a693d70002834bb90..d64efe67b18cc62e2eee87a90460ac96be0dc865 100644
--- a/chrome/browser/ui/webui/foreign_session_handler.cc
+++ b/chrome/browser/ui/webui/foreign_session_handler.cc
@@ -18,7 +18,6 @@
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "base/values.h"
-#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -29,8 +28,6 @@
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "components/pref_registry/pref_registry_syncable.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_source.h"
#include "content/public/browser/url_data_source.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
@@ -215,9 +212,6 @@ void ForeignSessionHandler::RegisterMessages() {
if (service)
scoped_observer_.Add(service);
- registrar_.Add(this, chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED,
- content::Source<Profile>(profile));
-
web_ui()->RegisterMessageCallback("deleteForeignSession",
base::Bind(&ForeignSessionHandler::HandleDeleteForeignSession,
base::Unretained(this)));
@@ -232,20 +226,11 @@ void ForeignSessionHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ForeignSessionHandler::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_FOREIGN_SESSION_UPDATED:
- HandleGetForeignSessions(nullptr);
- break;
- default:
- NOTREACHED();
- }
+void ForeignSessionHandler::OnSyncConfigurationCompleted() {
+ HandleGetForeignSessions(nullptr);
}
-void ForeignSessionHandler::OnSyncConfigurationCompleted() {
+void ForeignSessionHandler::OnForeignSessionUpdated() {
HandleGetForeignSessions(nullptr);
}
« no previous file with comments | « chrome/browser/ui/webui/foreign_session_handler.h ('k') | components/sync_driver/sync_service_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698