Chromium Code Reviews| Index: chrome/browser/safe_browsing/download_protection_service.h |
| diff --git a/chrome/browser/safe_browsing/download_protection_service.h b/chrome/browser/safe_browsing/download_protection_service.h |
| index e7fee05b4c4adbc2ede1f1289518485c6a5fafc4..c0ff4b7ba4171b97fc42cf6c78d6994d079b3a2c 100644 |
| --- a/chrome/browser/safe_browsing/download_protection_service.h |
| +++ b/chrome/browser/safe_browsing/download_protection_service.h |
| @@ -118,7 +118,7 @@ class DownloadProtectionService { |
| // delivered asynchronously via the given callback. This method must be |
| // called on the UI thread, and the callback will also be invoked on the UI |
| // thread. Pre-condition: !info.download_url_chain.empty(). |
| - virtual void CheckDownloadUrl(const content::DownloadItem& item, |
| + virtual void CheckDownloadUrl(content::DownloadItem* item, |
| const CheckDownloadCallback& callback); |
| // Returns true iff the download specified by |info| should be scanned by |
| @@ -223,6 +223,7 @@ class DownloadProtectionService { |
| private: |
| class CheckClientDownloadRequest; |
| class PPAPIDownloadRequest; |
| + friend class DownloadSBClient; |
| friend class DownloadProtectionServiceTest; |
| friend class DownloadDangerPromptTest; |
| @@ -259,6 +260,8 @@ class DownloadProtectionService { |
| static const void* const kDownloadPingTokenKey; |
| + static const void* const kDownloadReferrerChainDataKey; |
|
Nathan Parker
2017/01/24 22:46:46
nit: could this be in a anonymous namespace in the
Jialiu Lin
2017/01/25 00:11:20
Done.
kDownloadPingTokenKey is used in a browser t
|
| + |
| // Helper class for easy setting and getting token string. |
| class DownloadPingToken : public base::SupportsUserData::Data { |
| public: |
| @@ -295,13 +298,13 @@ class DownloadProtectionService { |
| // Returns the URL that will be used for download requests. |
| static GURL GetDownloadRequestUrl(); |
| - // If kDownloadAttribution feature is enabled, identify and add referrer chain |
| - // info of a download to ClientDownloadRequest proto. This function also |
| - // records UMA stats of download attribution result. |
| - void AddReferrerChainToClientDownloadRequest( |
| + // If kDownloadAttribution feature is enabled, identify referrer chain info of |
| + // a download. This function also records UMA stats of download attribution |
| + // result. |
| + void IdentifyReferrerChain( |
| const GURL& download_url, |
| content::WebContents* web_contents, |
| - ClientDownloadRequest* out_request); |
| + ReferrerChain* out_referrer_chain); |
| // If kDownloadAttribution feature is enabled, identify referrer chain of the |
| // PPAPI download based on the frame URL where the download is initiated. |