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

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

Issue 12033093: sync: Implementation of Priority Preferences. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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/profile_sync_service.cc
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc
index 8db6c45147ae61091329314f68ad894c34dfaab5..35e56815da9350f3c406241f5f7ac9ec3d30c901 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1513,6 +1513,17 @@ SyncBackendHost* ProfileSyncService::GetBackendForTest() {
return backend_.get();
}
+void ProfileSyncService::ConfigurePriorityDataTypes() {
+ const syncer::ModelTypeSet priority_types =
+ Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes());
+ if (!priority_types.Empty()) {
+ const syncer::ConfigureReason reason = HasSyncSetupCompleted() ?
+ syncer::CONFIGURE_REASON_RECONFIGURATION :
+ syncer::CONFIGURE_REASON_NEW_CLIENT;
+ data_type_manager_->Configure(priority_types, reason);
+ }
+}
+
void ProfileSyncService::ConfigureDataTypeManager() {
// Don't configure datatypes if the setup UI is still on the screen - this
// is to help multi-screen setting UIs (like iOS) where they don't want to
@@ -1540,6 +1551,7 @@ void ProfileSyncService::ConfigureDataTypeManager() {
base::Bind(&ProfileSyncService::StartSyncingWithServer,
base::Unretained(this))));
}
+ ConfigurePriorityDataTypes();
#if defined(OS_ANDROID)
if (GetPreferredDataTypes().Has(syncer::PASSWORDS) &&
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_preference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698