Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 10898002: Refactor BrowsingDataRemover creation for clarity. (Closed)

Created:
8 years, 3 months ago by Mike West
Modified:
8 years, 3 months ago
CC:
chromium-reviews, jochen (gone - plz use gerrit), Bernhard Bauer, engedy
Visibility:
Public.

Description

Refactor BrowsingDataRemover creation for clarity. We currently have two constructors for BrowsingDataRemover. This CL drops down to a single, private constructor with a few more specific public Create methods. At the same time we're making that chance, we should explicitly refer to the end of time when we want to remove all browsing data from a user's machine, rather than passing in base::Time::Now() which is vulnerable to clock skew or other simply issues of asynchronocity. The new CreateForPeriod method makes that decision explicit. base::Time::Max() has the nice property that it automatically compares as greater than any reasonable time we might encounter. This means we don't have to update every subsystem that BrowsingDataRemover relies on: they can continue to do simple comparisons without the complications of special-casing the null Time. BUG=144946, 130732 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=154744

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updating callsites. #

Total comments: 6

Patch Set 3 : Markus' feedback. #

Total comments: 9

Patch Set 4 : Feedback, round 1. #

Total comments: 3

Patch Set 5 : Bernhard/Markus feedback. #

Patch Set 6 : Mac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -115 lines) Patch
M chrome/browser/automation/automation_provider.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.h View 1 2 3 4 5 chunks +37 lines, -22 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover.cc View 1 2 3 4 5 4 chunks +27 lines, -45 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_browsertest.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 4 5 4 chunks +22 lines, -9 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/browsing_data/browsing_data_api.cc View 1 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_screen_handler.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/options/clear_browser_data_handler.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/webdata/autofill_table.cc View 1 2 3 4 5 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Mike West
Hello Jochen, Bernhard, and Markus! I've talked with all three of you at different points ...
8 years, 3 months ago (2012-08-28 10:00:06 UTC) #1
markusheintz_
https://chromiumcodereview.appspot.com/10898002/diff/1/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10898002/diff/1/chrome/browser/browsing_data/browsing_data_remover.h#newcode119 chrome/browser/browsing_data/browsing_data_remover.h:119: static BrowsingDataRemover* create(Profile* profile, Method names should start with ...
8 years, 3 months ago (2012-08-28 10:35:50 UTC) #2
Mike West
Markus, would you take another look before I loop in OWNERS for the other directories?
8 years, 3 months ago (2012-08-28 12:31:32 UTC) #3
markusheintz_
LGTM from my side after addressing the 3 comments below. https://chromiumcodereview.appspot.com/10898002/diff/2001/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10898002/diff/2001/chrome/browser/browsing_data/browsing_data_remover.h#newcode137 ...
8 years, 3 months ago (2012-08-28 13:10:23 UTC) #4
Mike West
Alright, thanks. On to OWNERS. https://chromiumcodereview.appspot.com/10898002/diff/2001/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10898002/diff/2001/chrome/browser/browsing_data/browsing_data_remover.h#newcode137 chrome/browser/browsing_data/browsing_data_remover.h:137: static bool is_removing() { ...
8 years, 3 months ago (2012-08-28 13:28:38 UTC) #5
Mike West
Hello, friendly OWNERS! Would you mind carefully evaluating (and LGTMing :) ) this BrowsingDataRemover refactoring? ...
8 years, 3 months ago (2012-08-28 13:44:37 UTC) #6
jam
On 2012/08/28 13:44:37, Mike West (chromium) wrote: > Hello, friendly OWNERS! Would you mind carefully ...
8 years, 3 months ago (2012-08-28 16:13:04 UTC) #7
Ben Goodger (Google)
ui LGTM
8 years, 3 months ago (2012-08-28 16:31:04 UTC) #8
Mike West
On 2012/08/28 16:13:04, John Abd-El-Malek wrote: > On 2012/08/28 13:44:37, Mike West (chromium) wrote: > ...
8 years, 3 months ago (2012-08-28 18:17:49 UTC) #9
cbentzel
prerender LGTM, but see note. https://chromiumcodereview.appspot.com/10898002/diff/1004/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10898002/diff/1004/chrome/browser/browsing_data/browsing_data_remover.h#newcode121 chrome/browser/browsing_data/browsing_data_remover.h:121: static BrowsingDataRemover* CreateForUnboundedRange(Profile* profile); ...
8 years, 3 months ago (2012-08-29 01:53:13 UTC) #10
Mike West
Cool. Thanks, folks. I'll clean this up based on comments, and land it once engedy ...
8 years, 3 months ago (2012-09-03 08:02:57 UTC) #11
markusheintz_
http://codereview.chromium.org/10898002/diff/1004/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): http://codereview.chromium.org/10898002/diff/1004/chrome/browser/browsing_data/browsing_data_remover.h#newcode121 chrome/browser/browsing_data/browsing_data_remover.h:121: static BrowsingDataRemover* CreateForUnboundedRange(Profile* profile); On 2012/09/03 08:02:57, Mike West ...
8 years, 3 months ago (2012-09-03 08:58:43 UTC) #12
Bernhard Bauer
Thanks for the cleanup! https://chromiumcodereview.appspot.com/10898002/diff/16001/chrome/browser/browsing_data/browsing_data_remover.h File chrome/browser/browsing_data/browsing_data_remover.h (right): https://chromiumcodereview.appspot.com/10898002/diff/16001/chrome/browser/browsing_data/browsing_data_remover.h#newcode138 chrome/browser/browsing_data/browsing_data_remover.h:138: static bool removing() { return ...
8 years, 3 months ago (2012-09-03 09:29:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10898002/18003
8 years, 3 months ago (2012-09-04 08:17:24 UTC) #14
commit-bot: I haz the power
Try job failure for 10898002-18003 (retry) on mac_rel for step "unit_tests". It's a second try, ...
8 years, 3 months ago (2012-09-04 09:41:34 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/10898002/14002
8 years, 3 months ago (2012-09-04 11:07:00 UTC) #16
commit-bot: I haz the power
8 years, 3 months ago (2012-09-04 13:25:49 UTC) #17
Change committed as 154744

Powered by Google App Engine
This is Rietveld 408576698