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 6b09d1fb189aee887af74774bfe163c88b847976..bd8aac9b339ddccc2f18864e7aadd6a0dd3c415d 100644 |
--- a/chrome/browser/sync/profile_sync_service_harness.cc |
+++ b/chrome/browser/sync/profile_sync_service_harness.cc |
@@ -364,12 +364,14 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
CHECK(snap); |
retry_verifier_.VerifyRetryInterval(*snap); |
if (retry_verifier_.done()) |
Raghu Simha
2011/09/19 22:25:02
This if block needs to be within braces.
lipalani1
2011/09/22 20:42:46
Done.
|
+ // Retry verifier is done verifying exponential backoff. |
SignalStateCompleteWithNextState(WAITING_FOR_NOTHING); |
break; |
} |
case WAITING_FOR_MIGRATION_TO_START: { |
VLOG(1) << GetClientInfoString("WAITING_FOR_MIGRATION_TO_START"); |
if (HasPendingBackendMigration()) { |
+ // No pending migrations. Now on to waiting for migrations. |
Raghu Simha
2011/09/19 22:25:02
How does HasPendingBackendMigration() == true indi
lipalani1
2011/09/22 20:42:46
Done.
|
SignalStateCompleteWithNextState(WAITING_FOR_MIGRATION_TO_FINISH); |
} |
break; |
@@ -377,6 +379,17 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
case WAITING_FOR_MIGRATION_TO_FINISH: { |
VLOG(1) << GetClientInfoString("WAITING_FOR_MIGRATION_TO_FINISH"); |
if (!HasPendingBackendMigration()) { |
+ // Done migrating. |
+ SignalStateCompleteWithNextState(WAITING_FOR_NOTHING); |
+ } |
+ break; |
+ } |
+ case WAITING_FOR_ACTIONABLE_ERROR: { |
+ VLOG(1) << GetClientInfoString("WAITING_FOR_ACTIONABLE_ERROR"); |
+ ProfileSyncService::Status status = GetStatus(); |
+ if (status.sync_protocol_error.action != browser_sync::UNKNOWN_ACTION && |
+ service_->unrecoverable_error_detected() == true) { |
+ // An actionable error has been detected. |
SignalStateCompleteWithNextState(WAITING_FOR_NOTHING); |
} |
break; |
@@ -582,6 +595,17 @@ bool ProfileSyncServiceHarness::AwaitExponentialBackoffVerification() { |
return (retry_verifier_.Succeeded()); |
} |
+bool ProfileSyncServiceHarness::AwaitActionableError() { |
+ ProfileSyncService::Status status = GetStatus(); |
+ CHECK(status.sync_protocol_error.action == browser_sync::UNKNOWN_ACTION); |
+ wait_state_ = WAITING_FOR_ACTIONABLE_ERROR; |
+ AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs, |
+ "Waiting for actionable error"); |
+ status = GetStatus(); |
+ return (status.sync_protocol_error.action != browser_sync::UNKNOWN_ACTION && |
+ service_->unrecoverable_error_detected()); |
+} |
+ |
bool ProfileSyncServiceHarness::AwaitMigration( |
const syncable::ModelTypeSet& expected_migrated_types) { |
VLOG(1) << GetClientInfoString("AwaitMigration"); |