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

Issue 1420013004: Polish the result communication and display of the browsing data counters. (Closed)

Created:
5 years, 1 month ago by msramek
Modified:
5 years, 1 month ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, dbeam+watch-options_chromium.org, markusheintz_, michaelpg+watch-options_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Polish the result communication and display of the browsing data counters. So far, counters only supported a single int as a result. This was already insufficient, as the history counter needs to return a <int, bool> pair, which had to be encoded into a single int. For the upcoming autofill counter, which returns 3 ints, this would be even worse. This CL restructures how the result is reported and interpreted. Counters now return a Result class with raw data instead of an int. The interpretation of that class is now the responsibility of the frontend. Strings on the frontend are crafted according to https://folio.googleplex.com/clear-browsing-data/Data%20counters/V1 . BUG=510028 Committed: https://crrev.com/6bb4dffab7e267d535162a2b17869db4b8662881 Cr-Commit-Position: refs/heads/master@{#357558}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Addressed comments. #

Patch Set 3 : Addressed comments. #

Total comments: 12

Patch Set 4 : Fix compilation. #

Patch Set 5 : Fixes. #

Total comments: 6

Patch Set 6 : Removed NOTREACHED. #

Patch Set 7 : Moved Value() to FinishedResult. #

Total comments: 7

Patch Set 8 : Nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -105 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 1 chunk +10 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_counter.h View 1 2 3 4 5 6 7 2 chunks +46 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_counter.cc View 1 2 3 4 5 6 1 chunk +40 lines, -2 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter.cc View 1 chunk +1 line, -9 lines 0 comments Download
M chrome/browser/browsing_data/cache_counter_browsertest.cc View 1 2 3 4 5 6 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/history_counter.h View 1 1 chunk +12 lines, -5 lines 0 comments Download
M chrome/browser/browsing_data/history_counter.cc View 2 chunks +13 lines, -16 lines 0 comments Download
M chrome/browser/browsing_data/history_counter_browsertest.cc View 1 2 3 4 5 6 8 chunks +47 lines, -28 lines 0 comments Download
M chrome/browser/browsing_data/passwords_counter_browsertest.cc View 1 2 3 4 5 6 1 chunk +9 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.h View 1 chunk +5 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.cc View 1 2 3 4 5 6 4 chunks +62 lines, -16 lines 0 comments Download

Messages

Total messages: 30 (12 generated)
msramek
Hi Bernhard, could you please have a look at this? Thanks, Martin
5 years, 1 month ago (2015-11-02 15:57:18 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/1420013004/diff/60001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1420013004/diff/60001/chrome/app/generated_resources.grd#newcode7702 chrome/app/generated_resources.grd:7702: + <message name="IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY" desc="A counter showing that the user's ...
5 years, 1 month ago (2015-11-02 16:15:27 UTC) #7
msramek
https://codereview.chromium.org/1420013004/diff/60001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/1420013004/diff/60001/chrome/app/generated_resources.grd#newcode7702 chrome/app/generated_resources.grd:7702: + <message name="IDS_DEL_CACHE_COUNTER_ALMOST_EMPTY" desc="A counter showing that the user's ...
5 years, 1 month ago (2015-11-02 20:54:06 UTC) #8
Bernhard Bauer
https://codereview.chromium.org/1420013004/diff/60001/chrome/browser/ui/webui/options/clear_browser_data_handler.cc File chrome/browser/ui/webui/options/clear_browser_data_handler.cc (right): https://codereview.chromium.org/1420013004/diff/60001/chrome/browser/ui/webui/options/clear_browser_data_handler.cc#newcode349 chrome/browser/ui/webui/options/clear_browser_data_handler.cc:349: static const int kBInMB = 1024 * 1024; On ...
5 years, 1 month ago (2015-11-03 10:11:20 UTC) #9
msramek
https://codereview.chromium.org/1420013004/diff/60001/chrome/browser/ui/webui/options/clear_browser_data_handler.cc File chrome/browser/ui/webui/options/clear_browser_data_handler.cc (right): https://codereview.chromium.org/1420013004/diff/60001/chrome/browser/ui/webui/options/clear_browser_data_handler.cc#newcode349 chrome/browser/ui/webui/options/clear_browser_data_handler.cc:349: static const int kBInMB = 1024 * 1024; On ...
5 years, 1 month ago (2015-11-03 10:55:46 UTC) #10
Bernhard Bauer
https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/browsing_data_counter.h File chrome/browser/browsing_data/browsing_data_counter.h (right): https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/browsing_data_counter.h#newcode30 chrome/browser/browsing_data/browsing_data_counter.h:30: virtual ResultInt Value() const; Add a comment that this ...
5 years, 1 month ago (2015-11-03 11:37:02 UTC) #11
msramek
...ok, this time I actually ran the tests before uploading :) https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/browsing_data_counter.h File chrome/browser/browsing_data/browsing_data_counter.h (right): ...
5 years, 1 month ago (2015-11-03 11:57:07 UTC) #12
Bernhard Bauer
https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/cache_counter_browsertest.cc File chrome/browser/browsing_data/cache_counter_browsertest.cc (right): https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/cache_counter_browsertest.cc#newcode136 chrome/browser/browsing_data/cache_counter_browsertest.cc:136: result_ = result->Value(); On 2015/11/03 11:57:06, msramek wrote: > ...
5 years, 1 month ago (2015-11-03 12:07:09 UTC) #13
msramek
https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/cache_counter_browsertest.cc File chrome/browser/browsing_data/cache_counter_browsertest.cc (right): https://codereview.chromium.org/1420013004/diff/140001/chrome/browser/browsing_data/cache_counter_browsertest.cc#newcode136 chrome/browser/browsing_data/cache_counter_browsertest.cc:136: result_ = result->Value(); On 2015/11/03 12:07:08, Bernhard Bauer wrote: ...
5 years, 1 month ago (2015-11-03 13:15:40 UTC) #15
Bernhard Bauer
LGTM with nits, and an optional suggestion: https://codereview.chromium.org/1420013004/diff/200001/chrome/browser/browsing_data/browsing_data_counter.h File chrome/browser/browsing_data/browsing_data_counter.h (right): https://codereview.chromium.org/1420013004/diff/200001/chrome/browser/browsing_data/browsing_data_counter.h#newcode23 chrome/browser/browsing_data/browsing_data_counter.h:23: // |Value()| ...
5 years, 1 month ago (2015-11-03 14:13:46 UTC) #16
msramek
Thanks, Bernhard! Sorry for having to iterate several times :/ I guess I'm just doing ...
5 years, 1 month ago (2015-11-03 14:54:09 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420013004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420013004/220001
5 years, 1 month ago (2015-11-03 14:55:26 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/73559)
5 years, 1 month ago (2015-11-03 15:51:50 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420013004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420013004/220001
5 years, 1 month ago (2015-11-03 16:00:23 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/135237)
5 years, 1 month ago (2015-11-03 17:14:04 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1420013004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1420013004/220001
5 years, 1 month ago (2015-11-03 17:25:56 UTC) #28
commit-bot: I haz the power
Committed patchset #8 (id:220001)
5 years, 1 month ago (2015-11-03 18:21:01 UTC) #29
commit-bot: I haz the power
5 years, 1 month ago (2015-11-03 18:22:42 UTC) #30
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/6bb4dffab7e267d535162a2b17869db4b8662881
Cr-Commit-Position: refs/heads/master@{#357558}

Powered by Google App Engine
This is Rietveld 408576698