| Index: components/sync/driver/sync_service.h
|
| diff --git a/components/sync/driver/sync_service.h b/components/sync/driver/sync_service.h
|
| index ac37926c4912e231acd2ac2ec9df396cf6741c96..0ec2b893c8ae24d94d0f08a28d6f89cb5d37a3d7 100644
|
| --- a/components/sync/driver/sync_service.h
|
| +++ b/components/sync/driver/sync_service.h
|
| @@ -21,23 +21,31 @@
|
|
|
| class GoogleServiceAuthError;
|
|
|
| -namespace sync_sessions {
|
| -class OpenTabsUIDelegate;
|
| -} // namespace sync_sessions
|
| +namespace browser_sync {
|
| +class ProtocolEventObserver;
|
| +}
|
|
|
| namespace syncer {
|
|
|
| class BaseTransaction;
|
| -class DataTypeController;
|
| class JsController;
|
| -class LocalDeviceInfoProvider;
|
| -class ProtocolEventObserver;
|
| -class SyncClient;
|
| class SyncCycleSnapshot;
|
| class TypeDebugInfoObserver;
|
| struct SyncStatus;
|
| struct UserShare;
|
|
|
| +} // namespace syncer
|
| +
|
| +namespace sync_sessions {
|
| +class OpenTabsUIDelegate;
|
| +} // namespace sync_sessions
|
| +
|
| +namespace sync_driver {
|
| +
|
| +class DataTypeController;
|
| +class LocalDeviceInfoProvider;
|
| +class SyncClient;
|
| +
|
| // UIs that need to prevent Sync startup should hold an instance of this class
|
| // until the user has finished modifying sync settings. This is not an inner
|
| // class of SyncService to enable forward declarations.
|
| @@ -77,7 +85,7 @@ class SyncService : public DataTypeEncryptionHandler {
|
|
|
| // Sync server connection status reported by sync backend.
|
| base::Time connection_status_update_time;
|
| - ConnectionStatus connection_status;
|
| + syncer::ConnectionStatus connection_status;
|
|
|
| // Times when OAuth2 access token is requested and received.
|
| base::Time token_request_time;
|
| @@ -110,14 +118,14 @@ class SyncService : public DataTypeEncryptionHandler {
|
|
|
| // Triggers a GetUpdates call for the specified |types|, pulling any new data
|
| // from the sync server.
|
| - virtual void TriggerRefresh(const ModelTypeSet& types) = 0;
|
| + virtual void TriggerRefresh(const syncer::ModelTypeSet& types) = 0;
|
|
|
| // Get the set of current active data types (those chosen or configured by
|
| // the user which have not also encountered a runtime error).
|
| // Note that if the Sync engine is in the middle of a configuration, this
|
| // will the the empty set. Once the configuration completes the set will
|
| // be updated.
|
| - virtual ModelTypeSet GetActiveDataTypes() const = 0;
|
| + virtual syncer::ModelTypeSet GetActiveDataTypes() const = 0;
|
|
|
| // Returns the SyncClient instance associated with this service.
|
| virtual SyncClient* GetSyncClient() const = 0;
|
| @@ -138,7 +146,7 @@ class SyncService : public DataTypeEncryptionHandler {
|
| // ASAP, presumably because a local change event has occurred but we're
|
| // still in deferred start mode, meaning the SyncableService hasn't been
|
| // told to MergeDataAndStartSyncing yet.
|
| - virtual void OnDataTypeRequestsSyncStartup(ModelType type) = 0;
|
| + virtual void OnDataTypeRequestsSyncStartup(syncer::ModelType type) = 0;
|
|
|
| // Returns true if sync is allowed, requested, and the user is logged in.
|
| // (being logged in does not mean that tokens are available - tokens may
|
| @@ -160,15 +168,15 @@ class SyncService : public DataTypeEncryptionHandler {
|
|
|
| // Returns the set of types which are preferred for enabling. This is a
|
| // superset of the active types (see GetActiveDataTypes()).
|
| - virtual ModelTypeSet GetPreferredDataTypes() const = 0;
|
| + virtual syncer::ModelTypeSet GetPreferredDataTypes() const = 0;
|
|
|
| // Called when a user chooses which data types to sync. |sync_everything|
|
| // represents whether they chose the "keep everything synced" option; if
|
| // true, |chosen_types| will be ignored and all data types will be synced.
|
| // |sync_everything| means "sync all current and future data types."
|
| - // |chosen_types| must be a subset of UserSelectableTypes().
|
| + // |chosen_types| must be a subset of syncer::UserSelectableTypes().
|
| virtual void OnUserChoseDatatypes(bool sync_everything,
|
| - ModelTypeSet chosen_types) = 0;
|
| + syncer::ModelTypeSet chosen_types) = 0;
|
|
|
| // Called whe Sync has been setup by the user and can be started.
|
| virtual void SetFirstSetupComplete() = 0;
|
| @@ -246,13 +254,14 @@ class SyncService : public DataTypeEncryptionHandler {
|
| // 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.
|
| - virtual bool IsCryptographerReady(const BaseTransaction* trans) const = 0;
|
| + virtual bool IsCryptographerReady(
|
| + const syncer::BaseTransaction* trans) const = 0;
|
|
|
| // TODO(akalin): This is called mostly by ModelAssociators and
|
| // tests. Figure out how to pass the handle to the ModelAssociators
|
| // directly, figure out how to expose this to tests, and remove this
|
| // function.
|
| - virtual UserShare* GetUserShare() const = 0;
|
| + virtual syncer::UserShare* GetUserShare() const = 0;
|
|
|
| // Returns DeviceInfo provider for the local device.
|
| virtual LocalDeviceInfoProvider* GetLocalDeviceInfoProvider() const = 0;
|
| @@ -267,7 +276,7 @@ class SyncService : public DataTypeEncryptionHandler {
|
| // Called to re-enable a type disabled by DisableDatatype(..). Note, this does
|
| // not change the preferred state of a datatype, and is not persisted across
|
| // restarts.
|
| - virtual void ReenableDatatype(ModelType type) = 0;
|
| + virtual void ReenableDatatype(syncer::ModelType type) = 0;
|
|
|
| // Return sync token status.
|
| virtual SyncTokenStatus GetSyncTokenStatus() const = 0;
|
| @@ -278,7 +287,7 @@ class SyncService : public DataTypeEncryptionHandler {
|
| // Initializes a struct of status indicators with data from the backend.
|
| // Returns false if the backend was not available for querying; in that case
|
| // the struct will be filled with default data.
|
| - virtual bool QueryDetailedSyncStatus(SyncStatus* result) = 0;
|
| + virtual bool QueryDetailedSyncStatus(syncer::SyncStatus* result) = 0;
|
|
|
| // Returns a user-friendly string form of last synced time (in minutes).
|
| virtual base::string16 GetLastSyncedTimeString() const = 0;
|
| @@ -286,7 +295,7 @@ class SyncService : public DataTypeEncryptionHandler {
|
| // Returns a human readable string describing backend initialization state.
|
| virtual std::string GetBackendInitializationStateString() const = 0;
|
|
|
| - virtual SyncCycleSnapshot GetLastCycleSnapshot() const = 0;
|
| + virtual syncer::SyncCycleSnapshot GetLastCycleSnapshot() const = 0;
|
|
|
| // Returns a ListValue indicating the status of all registered types.
|
| //
|
| @@ -306,14 +315,18 @@ class SyncService : public DataTypeEncryptionHandler {
|
| virtual std::string unrecoverable_error_message() const = 0;
|
| virtual tracked_objects::Location unrecoverable_error_location() const = 0;
|
|
|
| - virtual void AddProtocolEventObserver(ProtocolEventObserver* observer) = 0;
|
| - virtual void RemoveProtocolEventObserver(ProtocolEventObserver* observer) = 0;
|
| + virtual void AddProtocolEventObserver(
|
| + browser_sync::ProtocolEventObserver* observer) = 0;
|
| + virtual void RemoveProtocolEventObserver(
|
| + browser_sync::ProtocolEventObserver* observer) = 0;
|
|
|
| - virtual void AddTypeDebugInfoObserver(TypeDebugInfoObserver* observer) = 0;
|
| - virtual void RemoveTypeDebugInfoObserver(TypeDebugInfoObserver* observer) = 0;
|
| + virtual void AddTypeDebugInfoObserver(
|
| + syncer::TypeDebugInfoObserver* observer) = 0;
|
| + virtual void RemoveTypeDebugInfoObserver(
|
| + syncer::TypeDebugInfoObserver* observer) = 0;
|
|
|
| // Returns a weak pointer to the service's JsController.
|
| - virtual base::WeakPtr<JsController> GetJsController() = 0;
|
| + virtual base::WeakPtr<syncer::JsController> GetJsController() = 0;
|
|
|
| // Asynchronously fetches base::Value representations of all sync nodes and
|
| // returns them to the specified callback on this thread.
|
| @@ -332,6 +345,6 @@ class SyncService : public DataTypeEncryptionHandler {
|
| DISALLOW_COPY_AND_ASSIGN(SyncService);
|
| };
|
|
|
| -} // namespace syncer
|
| +} // namespace sync_driver
|
|
|
| #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_
|
|
|