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

Unified Diff: chrome/browser/sync/profile_sync_service.cc

Issue 494973003: Disable checkboxes in the advanced sync settings overlay whose type is force-enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index d46a0e76b7e51b138b82b8af42ef9d996ab8c120..1a8fbedc719d2465cf6d428bd337ffa09f12295d 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1892,7 +1892,7 @@ syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const {
const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes();
const syncer::ModelTypeSet preferred_types =
sync_prefs_.GetPreferredDataTypes(registered_types);
- return preferred_types;
+ return Union(preferred_types, GetDataTypesFromPreferenceProviders());
Marc Treib 2014/08/21 09:12:24 I think this should already have been in the previ
Nicolas Zea 2014/08/21 23:33:53 Yes. This might actually be something we should me
Marc Treib 2014/08/22 08:36:38 Intersection with RegisteredTypes done. I don't th
}
syncer::ModelTypeSet
@@ -1901,7 +1901,6 @@ ProfileSyncService::GetPreferredDirectoryDataTypes() const {
GetRegisteredDirectoryDataTypes();
const syncer::ModelTypeSet preferred_types =
sync_prefs_.GetPreferredDataTypes(registered_directory_types);
-
return Union(preferred_types, GetDataTypesFromPreferenceProviders());
}
@@ -1910,6 +1909,14 @@ ProfileSyncService::GetPreferredNonBlockingDataTypes() const {
return sync_prefs_.GetPreferredDataTypes(GetRegisteredNonBlockingDataTypes());
}
+syncer::ModelTypeSet
+ProfileSyncService::GetNonUserChoicePreferredDataTypes() const {
+ // TODO(treib,zea): When SyncPrefs also implements SyncTypePreferenceProvider,
+ // we'll need another way to distinguish user-choosable types from
+ // programmatically-enabled types.
+ return GetDataTypesFromPreferenceProviders();
Nicolas Zea 2014/08/21 23:33:53 For now we could look at the difference between th
Marc Treib 2014/08/22 08:36:38 That would give us the types that *can* be chosen
Nicolas Zea 2014/08/22 17:26:47 Note that I'm assuming GetPreferredDataTypes alrea
+}
+
syncer::ModelTypeSet ProfileSyncService::GetRegisteredDataTypes() const {
return Union(GetRegisteredDirectoryDataTypes(),
GetRegisteredNonBlockingDataTypes());

Powered by Google App Engine
This is Rietveld 408576698