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

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: rebase and cleanup 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 24690e970bd622cf67f8d420334cd853baf6819b..962b663dfe9bb5abc38317c9fb869a3c04926e7a 100644
--- a/chrome/browser/sync/profile_sync_service.cc
+++ b/chrome/browser/sync/profile_sync_service.cc
@@ -1329,6 +1329,7 @@ void ProfileSyncService::SetSetupInProgress(bool setup_in_progress) {
setup_in_progress_ = setup_in_progress;
if (!setup_in_progress && was_in_progress) {
if (sync_initialized()) {
+ ConfigurePriorityDataTypes();
ReconfigureDatatypeManager();
}
}
@@ -1519,6 +1520,13 @@ SyncBackendHost* ProfileSyncService::GetBackendForTest() {
return backend_.get();
}
+void ProfileSyncService::ConfigurePriorityDataTypes() {
+ const syncer::ModelTypeSet priority_types =
+ Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes());
+ data_type_manager_->Configure(priority_types,
+ syncer::CONFIGURE_REASON_RECONFIGURATION);
+}
+
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
@@ -1546,6 +1554,7 @@ void ProfileSyncService::ConfigureDataTypeManager() {
base::Bind(&ProfileSyncService::StartSyncingWithServer,
base::Unretained(this))));
}
+ ConfigurePriorityDataTypes();
#if defined(OS_ANDROID)
if (GetPreferredDataTypes().Has(syncer::PASSWORDS) &&

Powered by Google App Engine
This is Rietveld 408576698