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 d403396a159b1ec0f7771434fb075e0020af7aa0..ac574f3e582173f3bec98a02fabdcc081890008e 100644 |
--- a/chrome/browser/sync/profile_sync_service_harness.cc |
+++ b/chrome/browser/sync/profile_sync_service_harness.cc |
@@ -279,12 +279,6 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
SignalStateCompleteWithNextState(SET_PASSPHRASE_FAILED); |
break; |
} |
- if (!GetStatus().server_reachable) { |
- // The client cannot reach the sync server because the network is |
- // disabled. There is no need to wait anymore. |
- SignalStateCompleteWithNextState(SERVER_UNREACHABLE); |
- break; |
- } |
break; |
} |
case WAITING_FOR_DATA_SYNC: { |
@@ -337,12 +331,6 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
SignalStateCompleteWithNextState(FULLY_SYNCED); |
break; |
} |
- if (!GetStatus().server_reachable) { |
- // The client cannot reach the sync server because the network is |
- // disabled. There is no need to wait anymore. |
- SignalStateCompleteWithNextState(SERVER_UNREACHABLE); |
- break; |
- } |
break; |
} |
case WAITING_FOR_SYNC_CONFIGURATION: { |
@@ -400,15 +388,6 @@ bool ProfileSyncServiceHarness::RunStateChangeMachine() { |
} |
break; |
} |
- case SERVER_UNREACHABLE: { |
- DVLOG(1) << GetClientInfoString("SERVER_UNREACHABLE"); |
- if (GetStatus().server_reachable) { |
- // The client was offline due to the network being disabled, but is now |
- // back online. Wait for the pending sync cycle to complete. |
- SignalStateCompleteWithNextState(WAITING_FOR_FULL_SYNC); |
- } |
- break; |
- } |
case SET_PASSPHRASE_FAILED: { |
// A passphrase is required for decryption. There is nothing the sync |
// client can do until SetPassphrase() is called. |
@@ -539,7 +518,6 @@ bool ProfileSyncServiceHarness::AwaitDataSyncCompletion( |
CHECK(service()->sync_initialized()); |
CHECK_NE(wait_state_, SYNC_DISABLED); |
- CHECK_NE(wait_state_, SERVER_UNREACHABLE); |
if (IsDataSynced()) { |
// Client is already synced; don't wait. |
@@ -570,23 +548,12 @@ bool ProfileSyncServiceHarness::AwaitFullSyncCompletion( |
return true; |
} |
- if (wait_state_ == SERVER_UNREACHABLE) { |
- // Client was offline; wait for it to go online, and then wait for sync. |
- AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs, reason); |
- DCHECK_EQ(wait_state_, WAITING_FOR_FULL_SYNC); |
- return AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs, reason); |
- } |
- |
DCHECK(service()->sync_initialized()); |
wait_state_ = WAITING_FOR_FULL_SYNC; |
AwaitStatusChangeWithTimeout(kLiveSyncOperationTimeoutMs, reason); |
if (wait_state_ == FULLY_SYNCED) { |
// Client is online; sync was successful. |
return true; |
- } else if (wait_state_ == SERVER_UNREACHABLE) { |
- // Client is offline; sync was unsuccessful. |
- LOG(ERROR) << "Client went offline after waiting for sync to finish"; |
- return false; |
} else { |
LOG(ERROR) << "Invalid wait state: " << wait_state_; |
return false; |