Port HistoryService::GetVisibleVisitCountToHost to CancelableTaskTracker
Callback no longer receive a HistoryService::Handle, but instead client
code should use the returned base::CancelableTaskTracker::TaskId to
cancel an individual task.
Simplify implementation of BrowserFeatureExtractor as all the methods
from HistoryService that are called uses base::CancelableTaskTracker by
removing the mapping from HistoryService::Handle to request and using a
scoped_ptr to deal with the lifetime of the ClientPhishingRequest object.
BUG=371818
TBR=jochen
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=280110
Review URL: https://codereview.chromium.org/351553004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280796 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index 0aeb602..dc6af4c 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -150,9 +150,9 @@
if (history_service) {
history_service->GetVisibleVisitCountToHost(
site_url_,
- &visit_count_request_consumer_,
base::Bind(&WebsiteSettings::OnGotVisitCountToHost,
- base::Unretained(this)));
+ base::Unretained(this)),
+ &visit_count_task_tracker_);
}
PresentSitePermissions();
@@ -269,8 +269,7 @@
#endif
}
-void WebsiteSettings::OnGotVisitCountToHost(HistoryService::Handle handle,
- bool found_visits,
+void WebsiteSettings::OnGotVisitCountToHost(bool found_visits,
int visit_count,
base::Time first_visit) {
if (!found_visits) {