summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 23:28:45 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-28 23:28:45 +0000
commit3d5b88a429346af403c0b61c57a1cd6bb61a519a (patch)
tree909314c2600a16bb926ec36d87597818ad196bc0 /chrome/browser/browsing_data
parenteceb6297fd02897f5f4a694914bcb20959da123c (diff)
downloadchromium_src-3d5b88a429346af403c0b61c57a1cd6bb61a519a.zip
chromium_src-3d5b88a429346af403c0b61c57a1cd6bb61a519a.tar.gz
chromium_src-3d5b88a429346af403c0b61c57a1cd6bb61a519a.tar.bz2
Convert HistoryService::ExpireHistoryBetween() to not use CancelableRequest
Add CancelableTaskTracker::HasPendingTasks(). Untrack tasks as soon as they're cancelled. BUG=155883,141245 Review URL: https://codereview.chromium.org/11415146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data')
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover.cc4
-rw-r--r--chrome/browser/browsing_data/browsing_data_remover.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc
index c9dae36..992076c 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover.cc
@@ -241,9 +241,9 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask,
base::Time() : delete_end_;
history_service->ExpireHistoryBetween(restrict_urls,
delete_begin_, history_end_,
- &request_consumer_,
base::Bind(&BrowsingDataRemover::OnHistoryDeletionDone,
- base::Unretained(this)));
+ base::Unretained(this)),
+ &history_task_tracker_);
}
// Need to clear the host cache and accumulated speculative data, as it also
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h
index 7f09ca4..25b95d5 100644
--- a/chrome/browser/browsing_data/browsing_data_remover.h
+++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -14,8 +14,8 @@
#include "base/synchronization/waitable_event_watcher.h"
#include "base/time.h"
#include "chrome/browser/api/prefs/pref_member.h"
-#include "chrome/browser/common/cancelable_request.h"
#include "chrome/browser/pepper_flash_settings_manager.h"
+#include "chrome/common/cancelable_task_tracker.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -405,7 +405,7 @@ class BrowsingDataRemover : public content::NotificationObserver,
ObserverList<Observer> observer_list_;
// Used if we need to clear history.
- CancelableRequestConsumer request_consumer_;
+ CancelableTaskTracker history_task_tracker_;
DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
};