diff options
author | skrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 22:02:38 +0000 |
---|---|---|
committer | skrul@chromium.org <skrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-26 22:02:38 +0000 |
commit | e3e43d92c57ab8524e9a847ba779d8cbc51fdd54 (patch) | |
tree | 49933ab2440ed0ed6ca5a2ee08d7b5675ae25613 /chrome/browser/sync/profile_sync_service.h | |
parent | eafc0b45422fd004cbe5ca652eb5dd36a86b1c31 (diff) | |
download | chromium_src-e3e43d92c57ab8524e9a847ba779d8cbc51fdd54.zip chromium_src-e3e43d92c57ab8524e9a847ba779d8cbc51fdd54.tar.gz chromium_src-e3e43d92c57ab8524e9a847ba779d8cbc51fdd54.tar.bz2 |
Un-reverting 33964 - turns out the problem here was that I used DCHECKs with mocked methods in it, and in release mode my expectations no longer matched. See added #ifdef in data_type_manager_impl_unittest.cc.
Review URL: http://codereview.chromium.org/661111
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40164 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 | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h index ce36f98..109e814 100644 --- a/chrome/browser/sync/profile_sync_service.h +++ b/chrome/browser/sync/profile_sync_service.h @@ -15,6 +15,7 @@ #include "chrome/browser/google_service_auth_error.h" #include "chrome/browser/profile.h" #include "chrome/browser/sync/glue/data_type_controller.h" +#include "chrome/browser/sync/glue/data_type_manager.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" @@ -22,6 +23,8 @@ #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest_prod.h" +class ProfileSyncFactory; + namespace browser_sync { class ChangeProcessor; @@ -86,7 +89,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend, MAX_SYNC_EVENT_CODE }; - ProfileSyncService(Profile* profile, bool bootstrap_sync_authentication); + ProfileSyncService(ProfileSyncFactory* factory_, + Profile* profile, + bool bootstrap_sync_authentication); virtual ~ProfileSyncService(); // Initializes the object. This should be called every time an object of this @@ -236,10 +241,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend, void RegisterPreferences(); void ClearPreferences(); - void BookmarkStartCallback( - browser_sync::DataTypeController::StartResult result); - void PreferenceStartCallback( - browser_sync::DataTypeController::StartResult result); + void DataTypeManagerStartCallback( + browser_sync::DataTypeManager::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,15 +274,15 @@ class ProfileSyncService : public browser_sync::SyncFrontend, // store to bootstrap the authentication process. virtual 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_; // Time at which error UI is presented for the new tab page. base::TimeTicks auth_error_time_; + // Factory used to create various dependent objects. + ProfileSyncFactory* factory_; + // The profile whose data we are synchronizing. Profile* profile_; @@ -339,6 +342,9 @@ class ProfileSyncService : public browser_sync::SyncFrontend, // Which peer-to-peer notification method to use. browser_sync::NotificationMethod notification_method_; + // Manages the start and stop of the various data types. + scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; + ObserverList<Observer> observers_; DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |