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

Unified Diff: chrome/browser/sync/test/integration/profile_sync_service_harness.h

Issue 2716413003: Initial clear server data impl (Closed)
Patch Set: Adding confirmationuiclosed to prevent timeouts, addressing some naming concerns, and removing logg… Created 3 years, 9 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
Index: chrome/browser/sync/test/integration/profile_sync_service_harness.h
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.h b/chrome/browser/sync/test/integration/profile_sync_service_harness.h
index b4b82eb24c0a4f98daa69dad2a1b7ed36558a8a8..79c94f84abb72e821f4fd57bcf255389400937d7 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.h
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.h
@@ -55,9 +55,21 @@ class ProfileSyncServiceHarness {
// changes.
bool SetupSync();
+ // Setup sync without the authenticating through the passphrase encryption.
+ // Use this method when you need to setup a client that you're going to call
+ // RestartSyncService() directly after.
+ bool SetupSyncForClearingServerData();
+
+ // Both SetupSync and SetupSyncForClear call into this method.
// Same as the above method, but enables sync only for the datatypes contained
// in |synced_datatypes|.
- bool SetupSync(syncer::ModelTypeSet synced_datatypes);
+ bool SetupSync(syncer::ModelTypeSet synced_datatypes,
+ bool skip_passphrase_verification = false);
+
+ // Restart sync service to simulate a sign-in/sign-out. This is useful
+ // to recover from a lost birthday. Use directly after a clear server data
+ // command to start from clean slate.
+ bool RestartSyncService();
// Calling this acts as a barrier and blocks the caller until |this| and
// |partner| have both completed a sync cycle. When calling this method,
@@ -86,12 +98,12 @@ class ProfileSyncServiceHarness {
// (e.g., auth error) is reached. Returns true if and only if the engine
// initialized successfully. See ProfileSyncService's IsEngineInitialized()
// method for the definition of engine initialization.
- bool AwaitEngineInitialization();
+ bool AwaitEngineInitialization(bool skip_passphrase_verification = false);
// Blocks the caller until sync setup is complete. Returns true if and only
// if sync setup completed successfully. See syncer::SyncService's
// IsSyncActive() method for the definition of what successful means here.
- bool AwaitSyncSetupCompletion();
+ bool AwaitSyncSetupCompletion(bool skip_passphrase_verification = false);
// Returns the ProfileSyncService member of the sync client.
browser_sync::ProfileSyncService* service() const { return service_; }

Powered by Google App Engine
This is Rietveld 408576698