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

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

Issue 2735253002: Remove useless blocking handle from sync integ tests.
Patch Set: Created 3 years, 9 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 97f45645a54a9bc05db265383cc7f7fa1849b5c1..d833b37966bc5db73941ea476e570e1325af2d56 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -152,10 +152,6 @@ bool ProfileSyncServiceHarness::SetupSync(
return false;
}
- // Tell the sync service that setup is in progress so we don't start syncing
- // until we've finished configuration.
- sync_blocker_ = service()->GetSetupInProgressHandle();
pavely 2017/03/07 22:57:53 Sync blocker guarantees that configuration will no
skym 2017/03/07 23:31:10 My understanding is that Sync will not start until
pavely 2017/03/08 01:13:52 Actually login_ui_test_utils::SignInWithUI only si
-
DCHECK(!username_.empty());
if (signin_type_ == SigninType::UI_SIGNIN) {
Browser* browser = chrome::FindBrowserWithProfile(profile_);
@@ -188,8 +184,9 @@ bool ProfileSyncServiceHarness::SetupSync(
bool sync_everything = (synced_datatypes == syncer::UserSelectableTypes());
service()->OnUserChoseDatatypes(sync_everything, synced_datatypes);
- // Notify ProfileSyncService that we are done with configuration.
- FinishSyncSetup();
+ // Notify ProfileSyncService that it should begin configuration. This
+ // corresponds to the user confirming it's okay to start Sync.
+ service()->SetFirstSetupComplete();
if ((signin_type_ == SigninType::UI_SIGNIN) &&
!login_ui_test_utils::DismissSyncConfirmationDialog(
@@ -302,11 +299,6 @@ bool ProfileSyncServiceHarness::IsSyncDisabled() const {
return !service()->IsSetupInProgress() && !service()->IsFirstSetupComplete();
}
-void ProfileSyncServiceHarness::FinishSyncSetup() {
- sync_blocker_.reset();
- service()->SetFirstSetupComplete();
-}
-
SyncCycleSnapshot ProfileSyncServiceHarness::GetLastCycleSnapshot() const {
DCHECK(service() != nullptr) << "Sync service has not yet been set up.";
if (service()->IsSyncActive()) {

Powered by Google App Engine
This is Rietveld 408576698