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

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

Issue 2044303004: Sync: Support multiple setup UIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 years, 6 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.cc
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
index 10a03f0b4ee7582602062936cffd83f874b7298e..ce7ef41c693dde9da9cbb169a78591597ec6c570 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -155,7 +155,7 @@ bool ProfileSyncServiceHarness::SetupSync(
// Tell the sync service that setup is in progress so we don't start syncing
// until we've finished configuration.
- service()->SetSetupInProgress(true);
+ setup_handle_ = service()->GetSetupInProgressHandle();
DCHECK(!username_.empty());
if (signin_type_ == SigninType::UI_SIGNIN) {
@@ -163,6 +163,7 @@ bool ProfileSyncServiceHarness::SetupSync(
DCHECK(browser);
if (!login_ui_test_utils::SignInWithUI(browser, username_, password_)) {
LOG(ERROR) << "Could not sign in to GAIA servers.";
+ setup_handle_.reset();
maxbogue 2016/06/09 20:04:11 Why this extra reset, here and below?
tommycli 2016/06/10 00:04:15 Done. It was there to prevent the test to need to
return false;
}
} else if (signin_type_ == SigninType::FAKE_SIGNIN) {
@@ -181,6 +182,7 @@ bool ProfileSyncServiceHarness::SetupSync(
service()->RequestStart();
if (!AwaitBackendInitialization()) {
+ setup_handle_.reset();
return false;
}
@@ -305,7 +307,7 @@ bool ProfileSyncServiceHarness::IsSyncDisabled() const {
}
void ProfileSyncServiceHarness::FinishSyncSetup() {
- service()->SetSetupInProgress(false);
+ setup_handle_.reset();
service()->SetFirstSetupComplete();
}

Powered by Google App Engine
This is Rietveld 408576698