OLD | NEW |
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 #include "chrome/common/safe_browsing/csd.pb.h" |
10 | 10 |
11 class GURL; | |
12 | |
13 namespace content { | 11 namespace content { |
14 class DownloadItem; | 12 class DownloadItem; |
15 class WebContents; | 13 class WebContents; |
16 } | 14 } |
17 | 15 |
18 // Prompts the user for whether to Keep a dangerous DownloadItem using native | 16 // Prompts the user for whether to Keep a dangerous DownloadItem using native |
19 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to | 17 // UI. This prompt is invoked by the DownloadsDOMHandler when the user wants to |
20 // accept a dangerous download. Having a native dialog intervene during the this | 18 // accept a dangerous download. Having a native dialog intervene during the this |
21 // workflow means that the chrome://downloads page no longer has the privilege | 19 // workflow means that the chrome://downloads page no longer has the privilege |
22 // to accept a dangerous download from script without user intervention. This | 20 // to accept a dangerous download from script without user intervention. This |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bool did_proceed, | 61 bool did_proceed, |
64 const content::DownloadItem& download); | 62 const content::DownloadItem& download); |
65 | 63 |
66 protected: | 64 protected: |
67 // Records UMA stats for a download danger prompt event. | 65 // Records UMA stats for a download danger prompt event. |
68 static void RecordDownloadDangerPrompt(bool did_proceed, | 66 static void RecordDownloadDangerPrompt(bool did_proceed, |
69 const content::DownloadItem& download); | 67 const content::DownloadItem& download); |
70 }; | 68 }; |
71 | 69 |
72 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ | 70 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_DANGER_PROMPT_H_ |
OLD | NEW |