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

Unified Diff: chrome/browser/sync/profile_sync_service.h

Issue 217183003: Add non-blocking sync code to ProfileSyncService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments Created 6 years, 9 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/glue/sync_backend_host_mock.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 79b2a52657a5ed9577560b9a270eaa7320710a91..228dfbba90f79c3c6b67582ee35023b9da2b09ec 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -300,6 +300,12 @@ class ProfileSyncService : public ProfileSyncServiceBase,
void RegisterDataTypeController(
browser_sync::DataTypeController* data_type_controller);
+ // Registers a type whose sync storage will not be managed by the
+ // ProfileSyncService. It declares that this sync type may be activated at
+ // some point in the future. This function call does not enable or activate
+ // the syncing of this type
+ void RegisterNonBlockingType(syncer::ModelType type);
+
// Returns the session model associator associated with this type, but only if
// the associator is running. If it is doing anything else, it will return
// null.
@@ -578,12 +584,24 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// superset of the active types (see GetActiveDataTypes()).
virtual syncer::ModelTypeSet GetPreferredDataTypes() const;
+ // Returns the set of directory types which are preferred for enabling.
+ virtual syncer::ModelTypeSet GetPreferredDirectoryDataTypes() const;
+
+ // Returns the set of off-thread types which are preferred for enabling.
+ virtual syncer::ModelTypeSet GetPreferredNonBlockingDataTypes() const;
+
// Gets the set of all data types that could be allowed (the set that
// should be advertised to the user). These will typically only change
// via a command-line option. See class comment for more on what it means
// for a datatype to be Registered.
virtual syncer::ModelTypeSet GetRegisteredDataTypes() const;
+ // Gets the set of directory types which could be allowed.
+ virtual syncer::ModelTypeSet GetRegisteredDirectoryDataTypes() const;
+
+ // Gets the set of off-thread types which could be allowed.
+ virtual syncer::ModelTypeSet GetRegisteredNonBlockingDataTypes() const;
+
// Checks whether the Cryptographer is ready to encrypt and decrypt updates
// for sensitive data types. Caller must be holding a
// syncapi::BaseTransaction to ensure thread safety.
@@ -892,6 +910,9 @@ class ProfileSyncService : public ProfileSyncServiceBase,
// List of available data type controllers.
browser_sync::DataTypeController::TypeMap data_type_controllers_;
+ // List of registered types that use the non-blocking API.
+ syncer::ModelTypeSet non_blocking_types_;
+
// Whether the SyncBackendHost has been initialized.
bool backend_initialized_;
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_mock.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698