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

Unified Diff: components/sync/driver/sync_service_observer.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Created 3 years, 11 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
Index: components/sync/driver/sync_service_observer.h
diff --git a/components/sync/driver/sync_service_observer.h b/components/sync/driver/sync_service_observer.h
index 0c6e68e361054231d818009a91ea21f3a0b89c91..b6f264b981f63ad931e2fcd50b0c7878f906da69 100644
--- a/components/sync/driver/sync_service_observer.h
+++ b/components/sync/driver/sync_service_observer.h
@@ -7,6 +7,8 @@
namespace syncer {
+class SyncService;
+
// Various UI components such as the New Tab page can be driven by observing
// the SyncService through this interface.
class SyncServiceObserver {
@@ -28,11 +30,15 @@ class SyncServiceObserver {
// Called when the sync service has finished the datatype configuration
// process.
- virtual void OnSyncConfigurationCompleted() {}
+ virtual void OnSyncConfigurationCompleted(SyncService* sync) {}
skym 2017/01/26 17:00:37 So I'm not sure what other checks/events you're li
Steven Holte 2017/01/26 20:31:47 Added SyncService* to all functions. Also made a d
// Called when a foreign session has been updated.
virtual void OnForeignSessionUpdated() {}
+ // Called when the sync service is being shutdown permanently, so that
+ // longer-lived observers can drop references to it.
+ virtual void OnSyncShutdown(SyncService* sync) {}
+
protected:
virtual ~SyncServiceObserver() {}
};

Powered by Google App Engine
This is Rietveld 408576698