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

Unified Diff: chrome/browser/browsing_data/history_counter_browsertest.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/browsing_data/history_counter_browsertest.cc
diff --git a/chrome/browser/browsing_data/history_counter_browsertest.cc b/chrome/browser/browsing_data/history_counter_browsertest.cc
index 8bf2fc04035379be609ab78d4d7578bec1ec0c65..7dc73648f231cb0110ed351eab34ead6d689e733 100644
--- a/chrome/browser/browsing_data/history_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/history_counter_browsertest.cc
@@ -354,33 +354,33 @@ IN_PROC_BROWSER_TEST_F(HistoryCounterTest, DISABLED_RestartOnSyncChange) {
// We stop syncing history deletion in particular. This restarts the counter.
syncer::ModelTypeSet everything_except_history = syncer::ModelTypeSet::All();
everything_except_history.Remove(syncer::HISTORY_DELETE_DIRECTIVES);
- sync_service->SetSetupInProgress(true);
+ auto setup_handle = sync_service->GetSetupInProgressHandle();
sync_service->ChangePreferredDataTypes(everything_except_history);
- sync_service->SetSetupInProgress(false);
+ setup_handle.reset();
WaitForCountingOrConfirmFinished();
// If the history deletion sync is not affected, the counter is not restarted.
syncer::ModelTypeSet only_passwords(syncer::PASSWORDS);
sync_service->ChangePreferredDataTypes(only_passwords);
- sync_service->SetSetupInProgress(true);
+ setup_handle = sync_service->GetSetupInProgressHandle();
sync_service->ChangePreferredDataTypes(only_passwords);
- sync_service->SetSetupInProgress(false);
+ setup_handle.reset();
EXPECT_FALSE(counter.HasTrackedTasks());
EXPECT_FALSE(CountingFinishedSinceLastAsked());
// Same in this case.
syncer::ModelTypeSet autofill_and_passwords(
syncer::AUTOFILL, syncer::PASSWORDS);
- sync_service->SetSetupInProgress(true);
+ setup_handle = sync_service->GetSetupInProgressHandle();
sync_service->ChangePreferredDataTypes(autofill_and_passwords);
- sync_service->SetSetupInProgress(false);
+ setup_handle.reset();
EXPECT_FALSE(counter.HasTrackedTasks());
EXPECT_FALSE(CountingFinishedSinceLastAsked());
// We start syncing history deletion again. This restarts the counter.
- sync_service->SetSetupInProgress(true);
+ setup_handle = sync_service->GetSetupInProgressHandle();
sync_service->ChangePreferredDataTypes(syncer::ModelTypeSet::All());
- sync_service->SetSetupInProgress(false);
+ setup_handle.reset();
WaitForCountingOrConfirmFinished();
// Changing the syncing datatypes to another set that still includes history

Powered by Google App Engine
This is Rietveld 408576698