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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java

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/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
index 9b3c7260598e263807d08e8084f90da332af89be..46aa5804e6861592980f245ef1803ffe6e58b473 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
@@ -78,6 +78,8 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
@VisibleForTesting
public static final String PREFERENCE_SYNC_RECENT_TABS = "sync_recent_tabs";
@VisibleForTesting
+ public static final String PREFERENCE_SYNC_SETTINGS = "sync_settings";
+ @VisibleForTesting
public static final String PREFERENCE_ENCRYPTION = "encryption";
@VisibleForTesting
public static final String PREF_SYNC_SWITCH = "sync_switch";
@@ -99,6 +101,7 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
PREFERENCE_SYNC_OMNIBOX,
PREFERENCE_SYNC_PASSWORDS,
PREFERENCE_SYNC_RECENT_TABS,
+ PREFERENCE_SYNC_SETTINGS,
};
private static final String DASHBOARD_URL = "https://www.google.com/settings/chrome/sync";
@@ -109,6 +112,7 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
private CheckBoxPreference mSyncOmnibox;
private CheckBoxPreference mSyncPasswords;
private CheckBoxPreference mSyncRecentTabs;
+ private CheckBoxPreference mSyncSettings;
private Preference mSyncEncryption;
private Preference mManageSyncData;
private CheckBoxPreference[] mAllTypes;
@@ -132,13 +136,15 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
mSyncOmnibox = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_OMNIBOX);
mSyncPasswords = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_PASSWORDS);
mSyncRecentTabs = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_RECENT_TABS);
+ mSyncSettings = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_SETTINGS);
mSyncEncryption = findPreference(PREFERENCE_ENCRYPTION);
mSyncEncryption.setOnPreferenceClickListener(this);
mManageSyncData = findPreference(PREFERENCE_SYNC_MANAGE_DATA);
mManageSyncData.setOnPreferenceClickListener(this);
mAllTypes = new CheckBoxPreference[]{
- mSyncAutofill, mSyncBookmarks, mSyncOmnibox, mSyncPasswords, mSyncRecentTabs,
+ mSyncAutofill, mSyncBookmarks, mSyncOmnibox, mSyncPasswords,
+ mSyncRecentTabs, mSyncSettings
};
mSyncEverything.setOnPreferenceChangeListener(this);
@@ -329,6 +335,7 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
if (mSyncOmnibox.isChecked()) types.add(ModelType.TYPED_URL);
if (mSyncPasswords.isChecked()) types.add(ModelType.PASSWORD);
if (mSyncRecentTabs.isChecked()) types.add(ModelType.PROXY_TABS);
+ if (mSyncSettings.isChecked()) types.add(ModelType.PREFERENCE);
return types;
}
@@ -562,6 +569,9 @@ public class SyncCustomizationFragment extends PreferenceFragment implements
mSyncPasswords.setChecked(passwordSyncConfigurable
&& syncTypes.contains(ModelType.PASSWORD));
mSyncRecentTabs.setChecked(syncTypes.contains(ModelType.PROXY_TABS));
+ // TODO(zea): Switch this to PREFERENCE once that datatype is
+ // supported on Android.
+ mSyncSettings.setChecked(syncTypes.contains(ModelType.PRIORITY_PREFERENCE));
maxbogue 2015/07/08 23:10:38 Just to clarify my understanding: this is PRIORITY
Nicolas Zea 2015/07/08 23:20:34 Correct. The PREFERENCE type doesn't have a data t
}
}

Powered by Google App Engine
This is Rietveld 408576698