| 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 5cf6e416d70433022c3b295f67d8d272f8cf533e..ced4901b882e2a46e36e0c3ffe89272ad448403f 100644
|
| --- a/chrome/browser/sync/profile_sync_service_harness.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_harness.cc
|
| @@ -274,12 +274,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_DATA_SYNC: {
|
| @@ -330,12 +324,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: {
|
| @@ -393,15 +381,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.
|
| @@ -532,7 +511,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.
|
| @@ -563,23 +541,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;
|
|
|