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

Unified Diff: chrome/browser/ui/webui/foreign_session_handler.h

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/sync/profile_sync_service.cc ('k') | chrome/browser/ui/webui/foreign_session_handler.cc » ('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.h
diff --git a/chrome/browser/ui/webui/foreign_session_handler.h b/chrome/browser/ui/webui/foreign_session_handler.h
index 28218ab7e9bbffa663c3d2acf3518fdb9a56ebb6..85d3a226e9feba8c1837df34bd2c271f82bcc058 100644
--- a/chrome/browser/ui/webui/foreign_session_handler.h
+++ b/chrome/browser/ui/webui/foreign_session_handler.h
@@ -12,8 +12,6 @@
#include "chrome/browser/sessions/session_service.h"
#include "components/sync_driver/open_tabs_ui_delegate.h"
#include "components/sync_driver/sync_service_observer.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_message_handler.h"
@@ -33,7 +31,6 @@ class PrefRegistrySyncable;
namespace browser_sync {
class ForeignSessionHandler : public content::WebUIMessageHandler,
- public content::NotificationObserver,
public sync_driver::SyncServiceObserver {
public:
// Invalid value, used to note that we don't have a tab or window number.
@@ -62,14 +59,10 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
content::WebUI* web_ui);
private:
- // Determines how ForeignSessionHandler will interact with the new tab page.
- void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) override;
-
// sync_driver::SyncServiceObserver:
void OnStateChanged() override {}
void OnSyncConfigurationCompleted() override;
+ void OnForeignSessionUpdated() override;
// Returns true if tab sync is enabled for this profile, otherwise false.
bool IsTabSyncEnabled();
@@ -95,9 +88,6 @@ class ForeignSessionHandler : public content::WebUIMessageHandler,
void HandleSetForeignSessionCollapsed(const base::ListValue* args);
- // The Registrar used to register ForeignSessionHandler for notifications.
- content::NotificationRegistrar registrar_;
-
// ScopedObserver used to observe the ProfileSyncService.
ScopedObserver<sync_driver::SyncService, sync_driver::SyncServiceObserver>
scoped_observer_;
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/ui/webui/foreign_session_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698