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

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

Issue 2716413003: Initial clear server data impl (Closed)
Patch Set: Responding to CL comments. Some Logic changes, but mostly spelling/comments. 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..cb94267134e2570153f0892e4946576d8f3ef3ef 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,20 @@ 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 SetupSyncForClear();
+
+ // 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 forClear = 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,
@@ -88,11 +99,17 @@ class ProfileSyncServiceHarness {
// method for the definition of engine initialization.
bool AwaitEngineInitialization();
+ // Same as above, but without checks for passphrase decryption.
+ bool AwaitEngineInitializationForClear();
+
// 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();
+ // same as above, but without checks for passphrase decryption.
+ bool AwaitSyncSetupCompletionForClear();
+
// Returns the ProfileSyncService member of the sync client.
browser_sync::ProfileSyncService* service() const { return service_; }

Powered by Google App Engine
This is Rietveld 408576698