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

Issue 1618413002: Change the CBD dialog on Android to a PreferenceFragment (Closed)

Created:
4 years, 11 months ago by msramek
Modified:
4 years, 10 months ago
Reviewers:
melandory, *newt (away)
CC:
chromium-reviews, maxbogue+watch_chromium.org, plaree+watch_chromium.org, tim+watch_chromium.org, zea+watch_chromium.org, dmurph
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change the CBD dialog on Android to a PreferenceFragment According to the mocks (https://folio.googleplex.com/clear-browsing-data/Dialog%20-%20Android/V1#%2F00%20-%20Default%20Selection.png), the CBD dialog should look like a standard preferences page. Therefore, in this CL, we: 1. Make ClearBrowsingDataDialogFragment inherit from PreferencesFragment instead of DialogFragment 2. Following that change, replace CheckedTextView with CheckboxPreference, Button with ButtonPreference etc. 3. The dialog layout is now defined in an XML file instead of being generating through an Adapter. 4. Every ClearBrowsingDataDialogFragment.Item now corresponds to a CheckboxPreference, and thus it can delegate most of its logic (e.g. checked state, enabled state etc.) to that CheckboxPreference. Furthermore, to match the mocks, we: 5. Change the support string at the bottom of the dialog according to the mocks, and add a "Learn more" link. What is still different from the mocks and will be done in followup CLs (as they require separate Preference subclasses): 6. The time range combobox is not yet added 7. The support string is not of the correct color. 8. CheckboxPreference-s still have 1px border on top and bottom. BUG=569870 Committed: https://crrev.com/910dffdd8810791e3627fad75a318c14022d7e76 Cr-Commit-Position: refs/heads/master@{#373203}

Patch Set 1 : #

Patch Set 2 : Fixed tests. #

Patch Set 3 : Fixed tests (2nd try?) #

Patch Set 4 : Tests (3rd attempt) #

Patch Set 5 : Removed button, fixed tests #

Total comments: 4

Patch Set 6 : Unused variable. #

Total comments: 31

Patch Set 7 : Rebase #

Patch Set 8 : Addressed most comments. #

Patch Set 9 : Renaming. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -739 lines) Patch
D chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml View 1 chunk +0 lines, -26 lines 0 comments Download
D chrome/android/java/res/layout/single_line_bottom_text_dialog.xml View 1 chunk +0 lines, -18 lines 0 comments Download
M chrome/android/java/res/values/values.xml View 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/java/res/xml/clear_browsing_data_preferences.xml View 1 2 3 4 5 6 7 8 1 chunk +51 lines, -0 lines 0 comments Download
M chrome/android/java/res/xml/privacy_preferences.xml View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -387 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferences.java View 1 2 3 4 5 6 7 8 1 chunk +305 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferences.java View 1 2 3 4 5 6 chunks +0 lines, -46 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/signin/ConfirmAccountChangeFragment.java View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/sync/ui/ClearSyncDataDialogFragment.java View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -69 lines 0 comments Download
A + chrome/android/java/src/org/chromium/chrome/browser/sync/ui/ClearSyncDataPreferences.java View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -2 lines 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 2 chunks +7 lines, -1 line 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/HistoryUITest.java View 1 2 3 4 5 6 7 8 5 chunks +14 lines, -23 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragmentTest.java View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -120 lines 0 comments Download
A + chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java View 1 2 3 4 5 6 7 8 5 chunks +25 lines, -35 lines 0 comments Download

Messages

Total messages: 22 (9 generated)
msramek
Hi Newt and Tanja, Please have a look! This is a follow-up on https://codereview.chromium.org/1530123002/, where ...
4 years, 11 months ago (2016-01-22 17:59:43 UTC) #5
msramek
+cc dmurph@ To keep you in the loop, in case you're already starting to implement ...
4 years, 11 months ago (2016-01-22 18:46:30 UTC) #6
dmurph
On 2016/01/22 at 18:46:30, msramek wrote: > +cc dmurph@ To keep you in the loop, ...
4 years, 11 months ago (2016-01-22 18:48:44 UTC) #7
msramek
I made some more changes after a UX discussion we had today, pointed them out ...
4 years, 10 months ago (2016-01-28 18:43:49 UTC) #9
msramek
Sigh... Patchset 6 - removed a unused variable, as it didn't compile on trybots. Whatever ...
4 years, 10 months ago (2016-01-28 18:55:50 UTC) #10
newt (away)
Thanks for this! Looks generally good -- mostly minor comments inline. https://codereview.chromium.org/1618413002/diff/120001/chrome/android/java/res/values/values.xml File chrome/android/java/res/values/values.xml (right): ...
4 years, 10 months ago (2016-01-29 20:16:02 UTC) #11
msramek
Hi Newt, PTAL! I split the renaming into a separate patchset. The diffs are still ...
4 years, 10 months ago (2016-02-02 12:19:51 UTC) #13
msramek
On 2016/02/02 12:19:51, msramek wrote: > PTAL! I split the renaming into a separate patchset. ...
4 years, 10 months ago (2016-02-02 12:33:59 UTC) #14
newt (away)
lgtm. Thanks! https://codereview.chromium.org/1618413002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java File chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java (right): https://codereview.chromium.org/1618413002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java#newcode55 chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java:55: mCheckbox.setPersistent(false); On 2016/02/02 12:19:51, msramek wrote: > ...
4 years, 10 months ago (2016-02-02 19:35:03 UTC) #15
msramek
Thanks, Newt!
4 years, 10 months ago (2016-02-03 09:22:46 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1618413002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1618413002/200001
4 years, 10 months ago (2016-02-03 09:23:53 UTC) #18
commit-bot: I haz the power
Committed patchset #9 (id:200001)
4 years, 10 months ago (2016-02-03 09:29:55 UTC) #20
commit-bot: I haz the power
4 years, 10 months ago (2016-02-03 09:31:06 UTC) #22
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/910dffdd8810791e3627fad75a318c14022d7e76
Cr-Commit-Position: refs/heads/master@{#373203}

Powered by Google App Engine
This is Rietveld 408576698