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

Unified Diff: chrome/browser/safe_browsing/browser_feature_extractor.h

Issue 314293005: Change HistoryService::QueryURL to use CancelableTaskTracker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add comment for scoped_ptr usage Created 6 years, 6 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/safe_browsing/browser_feature_extractor.h
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.h b/chrome/browser/safe_browsing/browser_feature_extractor.h
index bdad2067023fb0cad43c9c7869743bf708bac407..bae6a16a8a40652646e070716796eaf4bf89667a 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.h
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.h
@@ -21,6 +21,7 @@
#include "base/containers/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "base/sequenced_task_runner_helpers.h"
+#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
#include "chrome/browser/common/cancelable_request.h"
#include "chrome/browser/history/history_types.h"
@@ -144,10 +145,11 @@ class BrowserFeatureExtractor {
// HistoryService callback which is called when we're done querying URL visits
// in the history.
- void QueryUrlHistoryDone(CancelableRequestProvider::Handle handle,
+ void QueryUrlHistoryDone(scoped_ptr<ClientPhishingRequest> request,
+ const DoneCallback& callback,
bool success,
- const history::URLRow* row,
- history::VisitVector* visits);
+ const history::URLRow& row,
+ const history::VisitVector& visits);
// HistoryService callback which is called when we're done querying HTTP host
// visits in the history.
@@ -198,6 +200,7 @@ class BrowserFeatureExtractor {
content::WebContents* tab_;
ClientSideDetectionHost* host_;
CancelableRequestConsumer request_consumer_;
+ base::CancelableTaskTracker cancelable_task_tracker_;
base::WeakPtrFactory<BrowserFeatureExtractor> weak_factory_;
// Set of pending extractions (i.e. extractions for which ExtractFeatures was

Powered by Google App Engine
This is Rietveld 408576698