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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover.cc

Issue 10830210: Fix crbug.com/140910 (BrowsingDataRemover not working). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More places fixed, added DCHECK and conversion to BrowsingDataRemover. Created 8 years, 4 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/browser/browsing_data/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 4f8785aa6d35d31c02b2fa4014cc39e1d4099198..576f3d1eb0484cae19aef63f60054ec158f6bf2e 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -128,6 +128,12 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
remove_origin_(GURL()),
origin_set_mask_(0) {
DCHECK(profile);
+ // crbug.com/140910: Many places were calling this with base::Time() as
+ // delete_end, even though they should've used base::Time::Now(). Work around
+ // it here. New code should use base::Time::Now().
+ DCHECK(delete_end_ != base::Time());
+ if (delete_end_ == base::Time())
+ delete_end_ = base::Time::Now();
}
BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
@@ -158,6 +164,12 @@ BrowsingDataRemover::BrowsingDataRemover(Profile* profile,
remove_origin_(GURL()),
origin_set_mask_(0) {
DCHECK(profile);
+ // crbug.com/140910: Many places were calling this with base::Time() as
+ // delete_end, even though they should've used base::Time::Now(). Work around
+ // it here. New code should use base::Time::Now().
+ DCHECK(delete_end_ != base::Time());
+ if (delete_end_ == base::Time())
+ delete_end_ = base::Time::Now();
}
BrowsingDataRemover::~BrowsingDataRemover() {
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698