summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 13:36:14 +0000
committerdubroy@chromium.org <dubroy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 13:36:14 +0000
commit30a74553b2e067ebcb63f03f86226d7fd2730f94 (patch)
tree7677b72beb5be5648eead1342b6ca8dab398dadc /chrome/browser
parenta69d3faca395a996f2b96a64c2bbc214ba85243b (diff)
downloadchromium_src-30a74553b2e067ebcb63f03f86226d7fd2730f94.zip
chromium_src-30a74553b2e067ebcb63f03f86226d7fd2730f94.tar.gz
chromium_src-30a74553b2e067ebcb63f03f86226d7fd2730f94.tar.bz2
Push check for Time::is_max() from BrowsingDataRemover to HistoryBackend.
No functionality change -- this just allows BrowsingDataRemover to call HistoryBackend::ExpireHistoryBetween with a null |end_time|, and still have it properly detected as the "remove all history" case. BUG=145680 Review URL: https://chromiumcodereview.appspot.com/12766003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover.cc12
-rw-r--r--chrome/browser/history/history_backend.cc3
2 files changed, 3 insertions, 12 deletions
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index 7484536..28c2557 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -238,18 +238,8 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
content::RecordAction(UserMetricsAction("ClearBrowsingData_History"));
waiting_for_clear_history_ = true;
- // The HistoryService special-cases an end time of base::Time() to
- // efficiently remove the whole history database. Support that here by
- // passing base::Time() into HistoryService::ExpireHistoryBetween rather
- // than base::Time::Max().
- //
- // TODO(sky?): Adjust HistoryService so that it understands Time::Max()
- // and deals well with non-max/non-null time periods: see
- // http://crbug.com/145680 for details.
- base::Time history_end_ = delete_end_ == base::Time::Max() ?
- base::Time() : delete_end_;
history_service->ExpireLocalAndRemoteHistoryBetween(
- restrict_urls, delete_begin_, history_end_,
+ restrict_urls, delete_begin_, delete_end_,
base::Bind(&BrowsingDataRemover::OnHistoryDeletionDone,
base::Unretained(this)),
&history_task_tracker_);
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 95980cf..26a0d9d 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -2713,7 +2713,8 @@ void HistoryBackend::ExpireHistoryBetween(
Time begin_time,
Time end_time) {
if (db_.get()) {
- if (begin_time.is_null() && end_time.is_null() && restrict_urls.empty()) {
+ if (begin_time.is_null() && (end_time.is_null() || end_time.is_max()) &&
+ restrict_urls.empty()) {
// Special case deleting all history so it can be faster and to reduce the
// possibility of an information leak.
DeleteAllHistory();