diff options
author | skrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-16 22:20:26 +0000 |
---|---|---|
committer | skrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-16 22:20:26 +0000 |
commit | 500f176dbbd17fee9f903d0163dafa89593cc1c0 (patch) | |
tree | 4a7550425c7bf70879d4146b959bac0ab0712131 /chrome/browser/sync/profile_sync_service.h | |
parent | 4cedf0dadf16c181be11d86f15af28c43c81b705 (diff) | |
download | chromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.zip chromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.tar.gz chromium_src-500f176dbbd17fee9f903d0163dafa89593cc1c0.tar.bz2 |
This change will include preferences as part of the usual startup sequence of the PSS that already includes bookmarks. This is a temporary solution until we have a proper component to manage the startup and shutdown of multiple data types.
Review URL: http://codereview.chromium.org/601037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39143 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 | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index 349e819f..569db52 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -14,7 +14,7 @@ #include "base/time.h" #include "chrome/browser/google_service_auth_error.h" #include "chrome/browser/profile.h" -#include "chrome/browser/sync/glue/data_type_controller.h" // For StartResult. +#include "chrome/browser/sync/glue/data_type_controller.h" #include "chrome/browser/sync/glue/sync_backend_host.h" #include "chrome/browser/sync/notification_method.h" #include "chrome/browser/sync/sync_setup_wizard.h" @@ -25,7 +25,6 @@ namespace browser_sync { class ChangeProcessor; -class DataTypeController; class UnrecoverableErrorHandler { public: @@ -60,8 +59,6 @@ class ProfileSyncServiceObserver { class ProfileSyncService : public browser_sync::SyncFrontend, public browser_sync::UnrecoverableErrorHandler { public: - typedef std::map<syncable::ModelType, browser_sync::DataTypeController*> - DataTypeControllerMap; typedef ProfileSyncServiceObserver Observer; typedef browser_sync::SyncBackendHost::Status Status; @@ -103,7 +100,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend, void RegisterDataTypeController( browser_sync::DataTypeController* data_type_controller); - const DataTypeControllerMap& data_type_controllers() const { + const browser_sync::DataTypeController::TypeMap& data_type_controllers() + const { return data_type_controllers_; } @@ -240,6 +238,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend, void BookmarkStartCallback( browser_sync::DataTypeController::StartResult result); + void PreferenceStartCallback( + browser_sync::DataTypeController::StartResult result); // Tests need to override this. If |delete_sync_data_folder| is true, then // this method will delete all previous "Sync Data" folders. (useful if the @@ -271,6 +271,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend, // store to bootstrap the authentication process. std::string GetLsidForAuthBootstraping(); + // Stops a data type. + void StopDataType(syncable::ModelType model_type); + // Time at which we begin an attempt a GAIA authorization. base::TimeTicks auth_start_time_; @@ -293,7 +296,7 @@ class ProfileSyncService : public browser_sync::SyncFrontend, scoped_ptr<browser_sync::SyncBackendHost> backend_; // List of available data type controllers. - DataTypeControllerMap data_type_controllers_; + browser_sync::DataTypeController::TypeMap data_type_controllers_; // Whether the SyncBackendHost has been initialized. bool backend_initialized_; @@ -322,6 +325,11 @@ class ProfileSyncService : public browser_sync::SyncFrontend, // doing any work that might corrupt things further. bool unrecoverable_error_detected_; + // True if at least one of the data types started up was started for + // the first time. TODO(sync): Remove this when we have full + // support for starting multiple data types. + bool startup_had_first_time_; + // Which peer-to-peer notification method to use. browser_sync::NotificationMethod notification_method_; |