diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:06:15 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-04 00:06:15 +0000 |
commit | 43ee82166efe4fea87bb186c629a35b3a8995fe2 (patch) | |
tree | 4aaefc82b73c3e0b4af7b8fc536476afed5a6ec5 /chrome/browser/sync/profile_sync_service.h | |
parent | 2238037ce16a1f6e736001813b6a05c87fe0f7a9 (diff) | |
download | chromium_src-43ee82166efe4fea87bb186c629a35b3a8995fe2.zip chromium_src-43ee82166efe4fea87bb186c629a35b3a8995fe2.tar.gz chromium_src-43ee82166efe4fea87bb186c629a35b3a8995fe2.tar.bz2 |
Add non-blocking sync code to ProfileSyncService
Adds support for non-blocking sync to the ProfileSyncService and related
classes. This continues the work of r258390 and r259921. Like those
patches, it is not expected to have any impact on behavior.
Introduces ProfileSyncService::RegisterNonBlockingType(). This function
will act as an alternative to RegisterDataTypeController().
Adds some support for these non-blocking types. Adds a special
case to the code that generates the 'type status' table on the
about:sync page.
Instantiates and copies a SyncCoreProxy object to the ProfileSyncService
as backend initialization completes. This will be an important part of
non-blocking data type initialization, once that functionality is
supported.
BUG=351005
Review URL: https://codereview.chromium.org/217183003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/profile_sync_service.h')
-rw-r--r-- | chrome/browser/sync/profile_sync_service.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 79b2a52..228dfbb 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_; |