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

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

Issue 1304933010: [Sync] Move data type logic from PSSA to PSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update OnUserChoseDatatypes() comment. Created 5 years, 3 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 1527dc6bfb7da069f5cedd965f445d0e30d9650b..d6670c1b1db0bf63db0faa0e43f84dab789b4cbd 100644
--- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
+++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -133,7 +133,7 @@ void ProfileSyncServiceHarness::SetCredentials(const std::string& username,
}
bool ProfileSyncServiceHarness::SetupSync() {
- bool result = SetupSync(syncer::ModelTypeSet::All());
+ bool result = SetupSync(syncer::UserSelectableTypes());
if (result == false) {
std::string status = GetServiceStatus();
LOG(ERROR) << profile_debug_name_
@@ -189,8 +189,7 @@ bool ProfileSyncServiceHarness::SetupSync(
// Choose the datatypes to be synced. If all datatypes are to be synced,
// set sync_everything to true; otherwise, set it to false.
- bool sync_everything =
- synced_datatypes.Equals(syncer::ModelTypeSet::All());
+ bool sync_everything = synced_datatypes.Equals(syncer::UserSelectableTypes());
service()->OnUserChoseDatatypes(sync_everything, synced_datatypes);
// Notify ProfileSyncService that we are done with configuration.
@@ -345,6 +344,7 @@ bool ProfileSyncServiceHarness::EnableSyncForDatatype(
}
synced_datatypes.Put(syncer::ModelTypeFromInt(datatype));
+ synced_datatypes.RetainAll(syncer::UserSelectableTypes());
service()->OnUserChoseDatatypes(false, synced_datatypes);
if (AwaitSyncSetupCompletion()) {
DVLOG(1) << "EnableSyncForDatatype(): Enabled sync for datatype "
« no previous file with comments | « chrome/browser/sync/test/integration/enable_disable_test.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698