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

Unified Diff: chrome/browser/download/download_danger_prompt.h

Issue 1436273002: Send safe browsing ThreatDetails to track download CTR when user tries to recover blocked downloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years, 1 month 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 | « no previous file | chrome/browser/download/download_danger_prompt.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_danger_prompt.h
diff --git a/chrome/browser/download/download_danger_prompt.h b/chrome/browser/download/download_danger_prompt.h
index e1b5c612c08994378a2e598440e948009d6aef82..4ca7bd2af80334fa1b90cdfa27da9e1bf2275db3 100644
--- a/chrome/browser/download/download_danger_prompt.h
+++ b/chrome/browser/download/download_danger_prompt.h
@@ -7,6 +7,8 @@
#include "base/callback_forward.h"
+class GURL;
+
namespace content {
class DownloadItem;
class WebContents;
@@ -37,15 +39,23 @@ class DownloadDangerPrompt {
// caller does not own the object and receive no guarantees about lifetime.
// If |show_context|, then the prompt message will contain some information
// about the download and its danger; otherwise it won't.
- static DownloadDangerPrompt* Create(
- content::DownloadItem* item,
- content::WebContents* web_contents,
- bool show_context,
- const OnDone& done);
+ static DownloadDangerPrompt* Create(content::DownloadItem* item,
+ content::WebContents* web_contents,
+ bool show_context,
+ const OnDone& done);
// Only to be used by tests. Subclasses must override to manually call the
// respective button click handler.
virtual void InvokeActionForTesting(Action action) = 0;
+
+ protected:
+ // Sends download recovery report to safe browsing backend.
+ // Since it only records download url (DownloadItem::GetURL()) and user's
+ // action (click through or not), it isn't gated by user's extended reporting
+ // preference (i.e. prefs::kSafeBrowsingExtendedReportingEnabled). We
+ // should not put any extra information in this report.
+ static void SendSafeBrowsingDownloadRecoveryReport(bool did_proceed,
+ const GURL& url);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_
« no previous file with comments | « no previous file | chrome/browser/download/download_danger_prompt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698