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

Unified Diff: chrome/browser/sync/glue/sync_backend_registrar.h

Issue 17552014: [Sync] Have SBH tell SyncManager which types to purge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dchecks Created 7 years, 6 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: chrome/browser/sync/glue/sync_backend_registrar.h
diff --git a/chrome/browser/sync/glue/sync_backend_registrar.h b/chrome/browser/sync/glue/sync_backend_registrar.h
index 31b13108ba5332f9da26819034ed38a8384e3a7a..f7ea1fb104778d227ef06555e73c0330ab083f2f 100644
--- a/chrome/browser/sync/glue/sync_backend_registrar.h
+++ b/chrome/browser/sync/glue/sync_backend_registrar.h
@@ -43,11 +43,6 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate,
Profile* profile,
base::MessageLoop* sync_loop);
- // Informs the SyncBackendRegistrar of the currently enabled set of types.
- // These types will be placed in the passive group. This function should be
- // called exactly once during startup.
- void SetInitialTypes(syncer::ModelTypeSet initial_types);
-
// SyncBackendRegistrar must be destroyed as follows:
//
// 1) On the sync thread, call OnSyncerShutdownComplete() after
@@ -61,6 +56,11 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate,
// thread which the syncer pushes changes to).
virtual ~SyncBackendRegistrar();
+ // Informs the SyncBackendRegistrar of the currently enabled set of types.
+ // These types will be placed in the passive group. This function should be
+ // called exactly once during startup.
+ void SetInitialTypes(syncer::ModelTypeSet initial_types);
+
// Returns whether or not we are currently syncing encryption keys.
// Must be called on the UI thread.
bool IsNigoriEnabled() const;
@@ -74,6 +74,11 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate,
syncer::ModelTypeSet types_to_add,
syncer::ModelTypeSet types_to_remove);
+ // Returns the set of enabled types as of the last configuration. Note that
+ // this might be different from the current types in the routing info due
+ // to DeactiveDataType being called separately from ConfigureDataTypes.
+ syncer::ModelTypeSet GetLastConfiguredTypes() const;
+
// Must be called from the UI thread. (See destructor comment.)
void StopOnUIThread();
@@ -160,6 +165,10 @@ class SyncBackendRegistrar : public syncer::SyncManager::ChangeDelegate,
// The change processors that handle the different data types.
std::map<syncer::ModelType, ChangeProcessor*> processors_;
+ // The types that were enabled as of the last configuration. Updated on each
+ // call to ConfigureDataTypes as well as SetInitialTypes.
+ syncer::ModelTypeSet last_configured_types_;
+
DISALLOW_COPY_AND_ASSIGN(SyncBackendRegistrar);
};
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698