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

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

Issue 2644573003: Initial version of the split CBD dialog (Closed)
Patch Set: rebase Created 3 years, 11 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 a8e4f3ce9c5c77feb162e5e204a69f4be1e7c295..82b5794fe09fbd57558e3f0db96f5fc04e46ba7a 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
@@ -71,7 +71,12 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
mCheckbox.setOnPreferenceClickListener(this);
mCheckbox.setEnabled(enabled);
mCheckbox.setChecked(selected);
- mCheckbox.setSummaryOff(""); // No summary when unchecked.
+
+ if (!ClearBrowsingDataTabsFragment.isFeatureEnabled()) {
+ // No summary when unchecked. The redesigned basic and advanced
+ // CBD views will always show the checkbox summary.
+ mCheckbox.setSummaryOff("");
+ }
}
public void destroy() {
@@ -100,6 +105,9 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
@Override
public void onCounterFinished(String result) {
mCheckbox.setSummaryOn(result);
+ if (ClearBrowsingDataTabsFragment.isFeatureEnabled()) {
+ mCheckbox.setSummaryOff(result);
+ }
if (mShouldAnnounceCounterResult) {
mCheckbox.announceForAccessibility(result);
}
@@ -277,7 +285,7 @@ public class ClearBrowsingDataPreferences extends PreferenceFragment
* Returns the Array of dialog options. Options are displayed in the same
* order as they appear in the array.
*/
- private DialogOption[] getDialogOptions() {
+ protected DialogOption[] getDialogOptions() {
return new DialogOption[] {
DialogOption.CLEAR_HISTORY,
DialogOption.CLEAR_COOKIES_AND_SITE_DATA,

Powered by Google App Engine
This is Rietveld 408576698