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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java

Issue 2730703003: Change CBD layout and texts (Closed)
Patch Set: rebase Created 3 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/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
index 666f185f26db80ba7fa32b5e0d28ad6f0b0e9402..e9cbb76456005ad36e7ff093d71c8413da445b4c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java
@@ -124,9 +124,11 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
@Override
public void onCounterFinished(String result) {
- mCheckbox.setSummaryOn(result);
+ // The new dialog will always show the summary, the old one only when checked.
if (ClearBrowsingDataTabsFragment.isFeatureEnabled()) {
- mCheckbox.setSummaryOff(result);
+ mCheckbox.setSummary(result);
+ } else {
+ mCheckbox.setSummaryOn(result);
}
if (mShouldAnnounceCounterResult) {
mCheckbox.announceForAccessibility(result);
@@ -143,8 +145,10 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
}
}
- private static final String PREF_HISTORY = "clear_history_checkbox";
- private static final String PREF_COOKIES = "clear_cookies_checkbox";
+ @VisibleForTesting
+ public static final String PREF_HISTORY = "clear_history_checkbox";
+ @VisibleForTesting
+ public static final String PREF_COOKIES = "clear_cookies_checkbox";
private static final String PREF_CACHE = "clear_cache_checkbox";
private static final String PREF_PASSWORDS = "clear_passwords_checkbox";
private static final String PREF_FORM_DATA = "clear_form_data_checkbox";
@@ -236,7 +240,7 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
/**
* An option to be shown in the time period spiner.
*/
- private static class TimePeriodSpinnerOption {
+ protected static class TimePeriodSpinnerOption {
private int mTimePeriod;
private String mTitle;
@@ -358,7 +362,7 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
* Returns the Array of time periods. Options are displayed in the same order as they appear
* in the array.
*/
- private TimePeriodSpinnerOption[] getTimePeriodSpinnerOptions() {
+ protected TimePeriodSpinnerOption[] getTimePeriodSpinnerOptions() {
Activity activity = getActivity();
TimePeriodSpinnerOption[] options = new TimePeriodSpinnerOption[] {

Powered by Google App Engine
This is Rietveld 408576698