Index: chrome/browser/sync/test_profile_sync_service.h |
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h |
index 1d82c2664ed7a298d5f664d6e616d2ee40c9f05c..709dc6e65b5884569dd07bb45ac7c80561d1a659 100644 |
--- a/chrome/browser/sync/test_profile_sync_service.h |
+++ b/chrome/browser/sync/test_profile_sync_service.h |
@@ -36,6 +36,8 @@ class SyncBackendHostForProfileSyncTest : public SyncBackendHost { |
Profile* profile, |
const base::WeakPtr<SyncPrefs>& sync_prefs, |
const base::WeakPtr<InvalidatorStorage>& invalidator_storage, |
+ syncer::TestIdFactory& id_factory, |
+ base::Callback<void(syncer::UserShare*)>& callback, |
bool set_initial_sync_ended_on_init, |
bool synchronous_init, |
bool fail_initial_download, |
@@ -51,12 +53,23 @@ class SyncBackendHostForProfileSyncTest : public SyncBackendHost { |
const base::Callback<void(syncer::ModelTypeSet)>& ready_task, |
const base::Closure& retry_callback) OVERRIDE; |
+ virtual void HandleSyncManagerInitializationOnFrontendLoop( |
+ const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success, |
+ syncer::ModelTypeSet restored_types) OVERRIDE; |
+ |
static void SetHistoryServiceExpectations(ProfileMock* profile); |
+ void SetInitialSyncEndedForAllTypes(); |
+ void dont_set_initial_sync_ended_on_init(); |
+ |
protected: |
virtual void InitCore(const DoInitializeOptions& options) OVERRIDE; |
private: |
+ syncer::TestIdFactory& id_factory_; |
+ base::Callback<void(syncer::UserShare*)>& callback_; |
+ |
+ bool set_initial_sync_ended_on_init_; |
bool synchronous_init_; |
bool fail_initial_download_; |
bool use_real_database_; |
@@ -66,21 +79,24 @@ class SyncBackendHostForProfileSyncTest : public SyncBackendHost { |
class TestProfileSyncService : public ProfileSyncService { |
public: |
+ // A no-op callback for clients that don't need to inject code into the |
+ // intialization process. |
+ static base::Callback<void(syncer::UserShare*)> NullCallback(); |
+ |
// |callback| can be used to populate nodes before the OnBackendInitialized |
// callback fires. |
// TODO(tim): Remove |synchronous_backend_initialization|, and add ability to |
// inject TokenService alongside SigninManager. |
- TestProfileSyncService(ProfileSyncComponentsFactory* factory, |
- Profile* profile, |
- SigninManager* signin, |
- ProfileSyncService::StartBehavior behavior, |
- bool synchronous_backend_initialization, |
- const base::Closure& callback); |
+ TestProfileSyncService( |
+ ProfileSyncComponentsFactory* factory, |
+ Profile* profile, |
+ SigninManager* signin, |
+ ProfileSyncService::StartBehavior behavior, |
+ bool synchronous_backend_initialization, |
+ const base::Callback<void(syncer::UserShare*)>& callback); |
virtual ~TestProfileSyncService(); |
- void SetInitialSyncEndedForAllTypes(); |
- |
virtual void OnBackendInitialized( |
const syncer::WeakHandle<syncer::JsBackend>& backend, |
bool success) OVERRIDE; |
@@ -117,7 +133,7 @@ class TestProfileSyncService : public ProfileSyncService { |
// step is performed synchronously. |
bool synchronous_sync_configuration_; |
- base::Closure callback_; |
+ base::Callback<void(syncer::UserShare*)> callback_; |
bool set_initial_sync_ended_on_init_; |
bool fail_initial_download_; |