| 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 864ab7677b06913e1c11b79cfebd5b5f8c2f46f4..3af1626d6600aadef8f6ee545889881ad206b7e4 100644
|
| --- a/chrome/browser/safe_browsing/client_side_detection_service.h
|
| +++ b/chrome/browser/safe_browsing/client_side_detection_service.h
|
| @@ -36,6 +36,7 @@
|
| #include "net/base/net_util.h"
|
|
|
| class RenderProcessHost;
|
| +class SafeBrowsingService;
|
|
|
| namespace base {
|
| class TimeDelta;
|
| @@ -151,6 +152,8 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
|
| FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest, IsBadIpAddress);
|
| FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest,
|
| ModelHasValidHashIds);
|
| + FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest,
|
| + SanitizeRequestForPingback);
|
|
|
| // CacheState holds all information necessary to respond to a caller without
|
| // actually making a HTTP request.
|
| @@ -181,6 +184,14 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
|
| static const base::TimeDelta kNegativeCacheInterval;
|
| static const base::TimeDelta kPositiveCacheInterval;
|
|
|
| + // Given a ClientSidePhishingRequest populated by the renderer and browser
|
| + // feature extractors, sanitizes it so that no data specifically identifying
|
| + // the URL or page content is included. This is used when sending a pingback
|
| + // if the user is not opted in to UMA.
|
| + static void SanitizeRequestForPingback(
|
| + const ClientPhishingRequest& original_request,
|
| + ClientPhishingRequest* sanitized_request);
|
| +
|
| // Starts sending the request to the client-side detection frontends.
|
| // This method takes ownership of both pointers.
|
| void StartClientReportPhishingRequest(
|
| @@ -237,6 +248,9 @@ class ClientSideDetectionService : public URLFetcher::Delegate,
|
| scoped_ptr<base::TimeDelta> model_max_age_;
|
| scoped_ptr<URLFetcher> model_fetcher_;
|
|
|
| + // This pointer may be NULL if SafeBrowsing is disabled.
|
| + scoped_refptr<SafeBrowsingService> sb_service_;
|
| +
|
| // Map of client report phishing request to the corresponding callback that
|
| // has to be invoked when the request is done.
|
| struct ClientReportInfo;
|
|
|