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

Unified Diff: chrome/browser/webdata/autofill_table.cc

Issue 10898002: Refactor BrowsingDataRemover creation for clarity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/webui/options/clear_browser_data_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webdata/autofill_table.cc
diff --git a/chrome/browser/webdata/autofill_table.cc b/chrome/browser/webdata/autofill_table.cc
index a1023b019f97a4b237b9c594920aa9494a9973b5..f390caa866c469970cd8203e0378d84f3a73b7e6 100644
--- a/chrome/browser/webdata/autofill_table.cc
+++ b/chrome/browser/webdata/autofill_table.cc
@@ -405,7 +405,7 @@ bool AutofillTable::RemoveFormElementsAddedBetween(
"WHERE ad.date_created >= ? AND ad.date_created < ?"));
s.BindInt64(0, delete_begin.ToTimeT());
s.BindInt64(1,
- delete_end.is_null() ?
+ (delete_end.is_null() || delete_end == base::Time::Max()) ?
std::numeric_limits<int64>::max() :
delete_end.ToTimeT());
@@ -1144,9 +1144,9 @@ bool AutofillTable::RemoveAutofillProfilesAndCreditCardsModifiedBetween(
DCHECK(delete_end.is_null() || delete_begin < delete_end);
time_t delete_begin_t = delete_begin.ToTimeT();
- time_t delete_end_t = delete_end.is_null() ?
- std::numeric_limits<time_t>::max() :
- delete_end.ToTimeT();
+ time_t delete_end_t =
+ (delete_end.is_null() || delete_end == base::Time::Max()) ?
+ std::numeric_limits<time_t>::max() : delete_end.ToTimeT();
// Remember Autofill profiles in the time range.
sql::Statement s_profiles_get(db_->GetUniqueStatement(
« no previous file with comments | « chrome/browser/ui/webui/options/clear_browser_data_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698