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

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

Issue 2681783003: Since SafeBrowsingNavigationObserverManager cleans up navigation events every two minutes, if downl… (Closed)
Patch Set: Created 3 years, 10 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/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..6bbbb4c05cfad9e3551ad9204000cb8221fc793f 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;
@@ -295,13 +296,12 @@ 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.
+ std::unique_ptr<ReferrerChain> IdentifyReferrerChain(
const GURL& download_url,
- content::WebContents* web_contents,
- ClientDownloadRequest* out_request);
+ content::WebContents* web_contents);
// If kDownloadAttribution feature is enabled, identify referrer chain of the
// PPAPI download based on the frame URL where the download is initiated.

Powered by Google App Engine
This is Rietveld 408576698