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

Unified Diff: chrome/browser/sync/profile_sync_service_harness.cc

Issue 7481009: Test birtday error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review Created 9 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
Index: chrome/browser/sync/profile_sync_service_harness.cc
diff --git a/chrome/browser/sync/profile_sync_service_harness.cc b/chrome/browser/sync/profile_sync_service_harness.cc
index 135eaf795e1b5faeaa51d12107326392fa1fdf8b..ff534c8405a9134691dd217a661b3414e36c979a 100644
--- a/chrome/browser/sync/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/profile_sync_service_harness.cc
@@ -311,6 +311,14 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() {
}
break;
}
+ case WAITING_FOR_SYNC_DISABLED: {
+ VLOG(1) << GetClientInfoString("WAITING_FOR_SYNC_DISABLED");
+ if (service()->HasSyncSetupCompleted() == false) {
+ // Sync has been disabled.
+ SignalStateCompleteWithNextState(SYNC_DISABLED);
+ }
+ break;
+ }
case SERVER_UNREACHABLE: {
VLOG(1) << GetClientInfoString("SERVER_UNREACHABLE");
if (GetStatus().server_reachable) {
@@ -453,6 +461,14 @@ bool ProfileSyncServiceHarness::AwaitSyncCycleCompletion(
}
}
+bool ProfileSyncServiceHarness::AwaitSyncDisabled(const std::string& reason) {
+ DCHECK(service()->HasSyncSetupCompleted());
+ DCHECK_NE(wait_state_, SYNC_DISABLED);
+ wait_state_ = WAITING_FOR_SYNC_DISABLED;
+ AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs, reason);
+ return wait_state_ == SYNC_DISABLED;
+}
+
bool ProfileSyncServiceHarness::AwaitMutualSyncCycleCompletion(
ProfileSyncServiceHarness* partner) {
VLOG(1) << GetClientInfoString("AwaitMutualSyncCycleCompletion");

Powered by Google App Engine
This is Rietveld 408576698