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

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

Issue 2601303002: Wireup SafeBrowsingNavigationObserverManager to help PPAPI download attribution (Closed)
Patch Set: add check for rfh Created 3 years, 11 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
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 213e2a7443eecf4c0ca144ecd003b68c8b9d7564..e7fee05b4c4adbc2ede1f1289518485c6a5fafc4 100644
--- a/chrome/browser/safe_browsing/download_protection_service.h
+++ b/chrome/browser/safe_browsing/download_protection_service.h
@@ -129,6 +129,8 @@ class DownloadProtectionService {
virtual void CheckPPAPIDownloadRequest(
const GURL& requestor_url,
+ const GURL& initiating_frame_url,
+ content::WebContents* web_contents,
const base::FilePath& default_file_path,
const std::vector<base::FilePath::StringType>& alternate_extensions,
Profile* profile,
@@ -173,6 +175,11 @@ class DownloadProtectionService {
return whitelist_sample_rate_;
}
+ scoped_refptr<SafeBrowsingNavigationObserverManager>
+ navigation_observer_manager() {
+ return navigation_observer_manager_;
+ }
+
static void SetDownloadPingToken(content::DownloadItem* item,
const std::string& token);
@@ -296,6 +303,16 @@ class DownloadProtectionService {
content::WebContents* web_contents,
ClientDownloadRequest* out_request);
+ // If kDownloadAttribution feature is enabled, identify referrer chain of the
+ // PPAPI download based on the frame URL where the download is initiated.
+ // Then add referrer chain info to ClientDownloadRequest proto. This function
+ // also records UMA stats of download attribution result.
+ void AddReferrerChainToPPAPIClientDownloadRequest(
+ const GURL& initiating_frame_url,
+ int tab_id,
+ bool has_user_gesture,
+ ClientDownloadRequest* out_request);
+
// These pointers may be NULL if SafeBrowsing is disabled.
scoped_refptr<SafeBrowsingUIManager> ui_manager_;
scoped_refptr<SafeBrowsingDatabaseManager> database_manager_;
« no previous file with comments | « chrome/browser/file_select_helper.cc ('k') | chrome/browser/safe_browsing/download_protection_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698