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

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

Issue 1222203008: [Sync] Add priority preferences datatype for mobile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 5 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_android.cc
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index 46b2d7edea360d27ba07cb6b767e5e9703a72041..a72255fd3f85fcd6cba1f30af5dd02dc6cda62fa 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -67,6 +67,8 @@ enum ModelTypeSelection {
SUPERVISED_USER_WHITELIST = 1 << 14,
AUTOFILL_WALLET = 1 << 15,
AUTOFILL_WALLET_METADATA = 1 << 16,
+ PREFERENCE = 1 << 17,
+ PRIORITY_PREFERENCE = 1 << 18,
};
// Native callback for the JNI GetAllNodes method. When
@@ -420,6 +422,8 @@ void ProfileSyncServiceAndroid::SetPreferredDataTypes(
types.Put(syncer::PROXY_TABS);
if (model_type_selection & TYPED_URL)
types.Put(syncer::TYPED_URLS);
+ if (model_type_selection & PREFERENCE)
+ types.Put(syncer::PREFERENCES);
DCHECK(syncer::UserSelectableTypes().HasAll(types));
sync_service_->OnUserChoseDatatypes(sync_everything, types);
}
@@ -524,6 +528,12 @@ jlong ProfileSyncServiceAndroid::ModelTypeSetToSelection(
if (types.Has(syncer::PASSWORDS)) {
model_type_selection |= PASSWORD;
}
+ if (types.Has(syncer::PREFERENCES)) {
+ model_type_selection |= PREFERENCE;
+ }
+ if (types.Has(syncer::PRIORITY_PREFERENCES)) {
+ model_type_selection |= PRIORITY_PREFERENCE;
+ }
if (types.Has(syncer::TYPED_URLS)) {
model_type_selection |= TYPED_URL;
}

Powered by Google App Engine
This is Rietveld 408576698