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

Unified Diff: chrome/browser/sync/profile_sync_service.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
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 32e563aafc0ce7753b4e7f9f7a929301429335c1..37ebcafe9c5634bc5f516724d66613fdad1215f8 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1811,6 +1811,8 @@ void ProfileSyncService::RefreshSpareBootstrapToken(
void ProfileSyncService::OnUserChoseDatatypes(
bool sync_everything,
syncer::ModelTypeSet chosen_types) {
+ DCHECK(syncer::UserSelectableTypes().HasAll(chosen_types));
+
if (!backend_.get() && !HasUnrecoverableError()) {
NOTREACHED();
return;
@@ -1848,7 +1850,8 @@ syncer::ModelTypeSet ProfileSyncService::GetActiveDataTypes() const {
syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const {
const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes();
const syncer::ModelTypeSet preferred_types =
- sync_prefs_.GetPreferredDataTypes(registered_types);
+ Union(sync_prefs_.GetPreferredDataTypes(registered_types),
+ syncer::ControlTypes());
const syncer::ModelTypeSet enforced_types =
Intersection(GetDataTypesFromPreferenceProviders(), registered_types);
return Union(preferred_types, enforced_types);
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698