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

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

Issue 8573018: Convert to base::Callback in safe_browsing client-side-detection code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Don't call Run() on null callbacks. Created 9 years, 1 month 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/client_side_detection_service.h
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.h b/chrome/browser/safe_browsing/client_side_detection_service.h
index a41a710f949c156adc072e69370e81f85ad8942c..380aa72b93b478ce99934838af946907ddce9466 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service.h
@@ -59,8 +59,8 @@ class ClientSideModel;
class ClientSideDetectionService : public content::URLFetcherDelegate,
public content::NotificationObserver {
public:
- typedef Callback2<GURL /* phishing URL */, bool /* is phishing */>::Type
- ClientReportPhishingRequestCallback;
+ // void(GURL phishing_url, bool is_phishing).
+ typedef base::Callback<void(GURL, bool)> ClientReportPhishingRequestCallback;
virtual ~ClientSideDetectionService();
@@ -102,7 +102,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate,
// NULL if you don't care about the server verdict.
virtual void SendClientReportPhishingRequest(
ClientPhishingRequest* verdict,
- ClientReportPhishingRequestCallback* callback);
+ const ClientReportPhishingRequestCallback& callback);
// Returns true if the given IP address string falls within a private
// (unroutable) network block. Pages which are hosted on these IP addresses
@@ -206,7 +206,7 @@ class ClientSideDetectionService : public content::URLFetcherDelegate,
// This method takes ownership of both pointers.
void StartClientReportPhishingRequest(
ClientPhishingRequest* verdict,
- ClientReportPhishingRequestCallback* callback);
+ const ClientReportPhishingRequestCallback& callback);
// Called by OnURLFetchComplete to handle the response from fetching the
// model.

Powered by Google App Engine
This is Rietveld 408576698