| Index: chrome/browser/safe_browsing/protocol_manager.h
|
| ===================================================================
|
| --- chrome/browser/safe_browsing/protocol_manager.h (revision 68800)
|
| +++ chrome/browser/safe_browsing/protocol_manager.h (working copy)
|
| @@ -50,7 +50,9 @@
|
| TestGetHashBackOffTimes);
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestMacKeyUrl);
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest,
|
| - TestSafeBrowsingReportUrl);
|
| + TestSafeBrowsingHitUrl);
|
| + FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest,
|
| + TestMalwareDetailsUrl);
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestNextChunkUrl);
|
| FRIEND_TEST_ALL_PREFIXES(SafeBrowsingProtocolManagerTest, TestUpdateUrl);
|
| friend class SafeBrowsingServiceTest;
|
| @@ -65,8 +67,8 @@
|
| const std::string& client_key,
|
| const std::string& wrapped_key,
|
| URLRequestContextGetter* request_context_getter,
|
| - const std::string& info_url_prefix,
|
| - const std::string& mackey_url_prefix,
|
| + const std::string& http_url_prefix,
|
| + const std::string& https_url_prefix,
|
| bool disable_auto_update);
|
| virtual ~SafeBrowsingProtocolManager();
|
|
|
| @@ -117,6 +119,9 @@
|
| bool is_subresource,
|
| SafeBrowsingService::UrlCheckResult threat_type);
|
|
|
| + // Users can opt-in on the SafeBrowsing interstitial to send detailed
|
| + // malware reports. |report| is the serialized report.
|
| + void ReportMalwareDetails(const std::string& report);
|
|
|
| // Setter for additional_query_. To make sure the additional_query_ won't
|
| // be changed in the middle of an update, caller (e.g.: SafeBrowsingService)
|
| @@ -158,11 +163,14 @@
|
| GURL GetHashUrl(bool use_mac) const;
|
| // Generates new MAC client key request URL.
|
| GURL MacKeyUrl() const;
|
| - // Generates URL for reporting malicious pages.
|
| - GURL SafeBrowsingReportUrl(
|
| + // Generates URL for reporting safe browsing hits for UMA users.
|
| + GURL SafeBrowsingHitUrl(
|
| const GURL& malicious_url, const GURL& page_url, const GURL& referrer_url,
|
| bool is_subresource,
|
| SafeBrowsingService::UrlCheckResult threat_type) const;
|
| + // Generates URL for reporting malware details for users who opt-in.
|
| + GURL MalwareDetailsUrl() const;
|
| +
|
| // Composes a ChunkUrl based on input string.
|
| GURL NextChunkUrl(const std::string& input) const;
|
|
|
| @@ -297,24 +305,26 @@
|
| int update_size_;
|
|
|
| // Track outstanding SafeBrowsing report fetchers for clean up.
|
| + // We add both "hit" and "detail" fetchers in this set.
|
| std::set<const URLFetcher*> safebrowsing_reports_;
|
|
|
| // The safe browsing client name sent in each request.
|
| std::string client_name_;
|
|
|
| // A string that is appended to the end of URLs for download, gethash,
|
| - // newkey, malware report and chunk update requests.
|
| + // newkey, safebrowsing hits and chunk update requests.
|
| std::string additional_query_;
|
|
|
| // The context we use to issue network requests.
|
| scoped_refptr<URLRequestContextGetter> request_context_getter_;
|
|
|
| // URL prefix where browser fetches safebrowsing chunk updates, hashes, and
|
| - // reports malware.
|
| - std::string info_url_prefix_;
|
| + // reports hits to the safebrowsing list for UMA users.
|
| + std::string http_url_prefix_;
|
|
|
| - // URL prefix where browser fetches MAC client key.
|
| - std::string mackey_url_prefix_;
|
| + // URL prefix where browser fetches MAC client key, and reports detailed
|
| + // malware reports for users who opt-in.
|
| + std::string https_url_prefix_;
|
|
|
| // When true, protocol manager will not start an update unless
|
| // ForceScheduleNextUpdate() is called. This is set for testing purpose.
|
|
|