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

Issue 1530123002: Prepare ClearBrowsingDataDialogFragment for browsing data counters. (Closed)

Created:
5 years ago by msramek
Modified:
4 years, 11 months ago
CC:
chromium-reviews, maxbogue+watch_chromium.org, plaree+watch_chromium.org, pvalenzuela+watch_chromium.org, tim+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@utils
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prepare ClearBrowsingDataDialogFragment for browsing data counters. Following the desktop implementation (crbug.com/510028), we proceed to implement browsing data counters on Android (crbug.com/569870). In this CL, we: 1. Add the ability to create, hold and destroy browsing data counters from the android UI (ClearBrowsingDataDialogFragment). 2. Refactor ClearBrowsingDataDialogFragment so that all properties of a dialog item (label, whether it's checked etc.) and methods related to the counter are held together by an inner class "Item". 3. Remember the checkbox state in a preference; this is necessary to manage the counters (that always check the preference). However, this also fixes the bug crbug.com/549172 that requests the labels to be sticky. 4. Add a new layout that holds the CheckedTextView together with the counter text; note that unless the experiment is enabled (see AreCountersEnabled() method), the counter text will be set to Visibility.GONE. In other words, this CL introduces no visual changes unless the user explicitly enables the experiment. In this CL, we don't: 5. Polish the UI. The mocks are ready (https://folio.googleplex.com/clear-browsing-data/Dialog%20-%20Android/V1), but this will be done in another CL. BUG=569870, 549172 BASE=1527653004 Committed: https://crrev.com/7984da63c93bb6328a3eeede7bf7e76855470995 Cr-Commit-Position: refs/heads/master@{#370004}

Patch Set 1 : #

Total comments: 22

Patch Set 2 : Rebase. #

Patch Set 3 : Added *Bridge class, shared enum #

Total comments: 45

Patch Set 4 : Rebase, addressed comments #

Total comments: 10

Patch Set 5 : Nits. #

Patch Set 6 : isOptionSelectedByDefault #

Total comments: 6

Patch Set 7 : s/default/NUM_TYPES/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -100 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java View 1 2 3 4 2 chunks +28 lines, -6 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/BrowsingDataCounterBridge.java View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragment.java View 1 2 3 4 5 10 chunks +157 lines, -66 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/sync/ui/ClearSyncDataDialogFragment.java View 4 chunks +6 lines, -8 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataDialogFragmentTest.java View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
A chrome/browser/android/browsing_data/browsing_data_counter_bridge.h View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
A chrome/browser/android/browsing_data/browsing_data_counter_bridge.cc View 1 2 3 1 chunk +64 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/android/preferences/pref_service_bridge.cc View 1 2 3 4 5 3 chunks +66 lines, -17 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_counter_utils.h View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_counter_utils.cc View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 3 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
msramek
Hi Newt and Tanja, can you please have a look at this? It's been over ...
5 years ago (2015-12-16 13:25:01 UTC) #3
newt (away)
Thanks! https://codereview.chromium.org/1530123002/diff/20001/chrome/android/java/res/layout/checked_text_view_with_footer.xml File chrome/android/java/res/layout/checked_text_view_with_footer.xml (right): https://codereview.chromium.org/1530123002/diff/20001/chrome/android/java/res/layout/checked_text_view_with_footer.xml#newcode1 chrome/android/java/res/layout/checked_text_view_with_footer.xml:1: <?xml version="1.0" encoding="utf-8"?> realistically, this layout won't be ...
5 years ago (2015-12-17 22:54:59 UTC) #4
msramek
Thanks for all the guidance, Newt! PTAL! https://codereview.chromium.org/1530123002/diff/20001/chrome/android/java/res/layout/checked_text_view_with_footer.xml File chrome/android/java/res/layout/checked_text_view_with_footer.xml (right): https://codereview.chromium.org/1530123002/diff/20001/chrome/android/java/res/layout/checked_text_view_with_footer.xml#newcode1 chrome/android/java/res/layout/checked_text_view_with_footer.xml:1: <?xml version="1.0" ...
4 years, 11 months ago (2016-01-11 11:39:41 UTC) #6
newt (away)
Thanks for the follow-up. Another round of comments :) https://codereview.chromium.org/1530123002/diff/80001/chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml File chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml (right): https://codereview.chromium.org/1530123002/diff/80001/chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml#newcode2 chrome/android/java/res/layout/clear_browsing_data_dialog_item.xml:2: ...
4 years, 11 months ago (2016-01-12 18:55:27 UTC) #7
msramek
PTAL. Some changes from a rebase creeped in, but I guess it's still easier to ...
4 years, 11 months ago (2016-01-13 15:27:54 UTC) #9
newt (away)
A few nits, then lgtm. Thanks! https://codereview.chromium.org/1530123002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java File chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java (right): https://codereview.chromium.org/1530123002/diff/80001/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java#newcode634 chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java:634: public boolean getBrowsingDataDeletionPreference(int ...
4 years, 11 months ago (2016-01-13 20:01:49 UTC) #10
msramek
Thanks, Newt! I addressed the nits in Patchset #5, but made one last small change ...
4 years, 11 months ago (2016-01-14 15:45:44 UTC) #12
msramek
Hi Bernhard, can you please review browsing_data_counter_utils.[cc|h] as an owner? Furthermore, in one of his ...
4 years, 11 months ago (2016-01-14 15:52:01 UTC) #14
Bernhard Bauer
https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc File chrome/browser/browsing_data/browsing_data_counter_utils.cc (right): https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc#newcode193 chrome/browser/browsing_data/browsing_data_counter_utils.cc:193: default: Replace this with NUM_TYPES please, so that the ...
4 years, 11 months ago (2016-01-14 16:12:43 UTC) #15
msramek
https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc File chrome/browser/browsing_data/browsing_data_counter_utils.cc (right): https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc#newcode193 chrome/browser/browsing_data/browsing_data_counter_utils.cc:193: default: On 2016/01/14 16:12:43, Bernhard Bauer wrote: > Replace ...
4 years, 11 months ago (2016-01-14 18:03:33 UTC) #16
Bernhard Bauer
lgtm https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc File chrome/browser/browsing_data/browsing_data_counter_utils.cc (right): https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc#newcode193 chrome/browser/browsing_data/browsing_data_counter_utils.cc:193: default: On 2016/01/14 18:03:33, msramek wrote: > On ...
4 years, 11 months ago (2016-01-14 18:23:00 UTC) #17
msramek
+Jochen, please review chrome/chrome.gyp. Thanks! https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc File chrome/browser/browsing_data/browsing_data_counter_utils.cc (right): https://codereview.chromium.org/1530123002/diff/180001/chrome/browser/browsing_data/browsing_data_counter_utils.cc#newcode193 chrome/browser/browsing_data/browsing_data_counter_utils.cc:193: default: On 2016/01/14 18:23:00, ...
4 years, 11 months ago (2016-01-14 18:37:58 UTC) #19
jochen (gone - plz use gerrit)
lgtm
4 years, 11 months ago (2016-01-15 14:38:54 UTC) #20
msramek
Thanks, folks! It's safely after branchpoint, so let me land this :)
4 years, 11 months ago (2016-01-18 09:18:49 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1530123002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1530123002/200001
4 years, 11 months ago (2016-01-18 09:19:08 UTC) #24
commit-bot: I haz the power
Committed patchset #7 (id:200001)
4 years, 11 months ago (2016-01-18 10:09:07 UTC) #25
commit-bot: I haz the power
4 years, 11 months ago (2016-01-18 10:09:57 UTC) #27
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7984da63c93bb6328a3eeede7bf7e76855470995
Cr-Commit-Position: refs/heads/master@{#370004}

Powered by Google App Engine
This is Rietveld 408576698