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

Side by Side Diff: chrome/browser/download/download_danger_prompt.h

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re-write using GetUserData/SetUserData Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "chrome/common/safe_browsing/csd.pb.h"
9 10
10 class GURL; 11 class GURL;
11 12
12 namespace content { 13 namespace content {
13 class DownloadItem; 14 class DownloadItem;
14 class WebContents; 15 class WebContents;
15 } 16 }
16 17
17 // Prompts the user for whether to Keep a dangerous DownloadItem using native 18 // Prompts the user for whether to Keep a dangerous DownloadItem using native
18 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to 19 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // respective button click handler. 52 // respective button click handler.
52 virtual void InvokeActionForTesting(Action action) = 0; 53 virtual void InvokeActionForTesting(Action action) = 0;
53 54
54 protected: 55 protected:
55 // Sends download recovery report to safe browsing backend. 56 // Sends download recovery report to safe browsing backend.
56 // Since it only records download url (DownloadItem::GetURL()), user's 57 // Since it only records download url (DownloadItem::GetURL()), user's
57 // action (click through or not) and its download danger type, it isn't gated 58 // action (click through or not) and its download danger type, it isn't gated
58 // by user's extended reporting preference (i.e. 59 // by user's extended reporting preference (i.e.
59 // prefs::kSafeBrowsingExtendedReportingEnabled). We should not put any extra 60 // prefs::kSafeBrowsingExtendedReportingEnabled). We should not put any extra
60 // information in this report. 61 // information in this report.
61 static void SendSafeBrowsingDownloadRecoveryReport( 62 static void SendSafeBrowsingDownloadReport(
63 safe_browsing::ClientSafeBrowsingReportRequest::ReportType report_type,
62 bool did_proceed, 64 bool did_proceed,
63 const content::DownloadItem& download); 65 const content::DownloadItem& download);
64 66
65 // Records UMA stats for a download danger prompt event. 67 // Records UMA stats for a download danger prompt event.
66 static void RecordDownloadDangerPrompt(bool did_proceed, 68 static void RecordDownloadDangerPrompt(bool did_proceed,
67 const content::DownloadItem& download); 69 const content::DownloadItem& download);
68 }; 70 };
69 71
70 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ 72 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698