Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6786)

Unified Diff: chrome/browser/sync/test_profile_sync_service.h

Issue 10804039: Make SyncBackendRegistrar aware of loaded data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4ca6b253123c3cabba07e9cedcc74254e1eb397..95a11da8009a9b3db089326b379a8aeb3ae88e7a 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::Closure& 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::Closure& callback_;
+
+ bool set_initial_sync_ended_on_init_;
bool synchronous_init_;
bool fail_initial_download_;
bool use_real_database_;
@@ -70,17 +83,16 @@ class TestProfileSyncService : public ProfileSyncService {
// 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::Closure& callback);
virtual ~TestProfileSyncService();
- void SetInitialSyncEndedForAllTypes();
-
virtual void OnBackendInitialized(
const syncer::WeakHandle<syncer::JsBackend>& backend,
bool success) OVERRIDE;
@@ -89,6 +101,9 @@ class TestProfileSyncService : public ProfileSyncService {
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // We implement our own version to avoid some DCHECKs.
+ virtual syncer::UserShare* GetUserShare() const OVERRIDE;
+
// If this is called, configuring data types will require a syncer
// nudge.
void dont_set_initial_sync_ended_on_init();
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/browser/sync/test_profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698