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

Side by Side Diff: content/browser/download/download_state_info.h

Issue 8468020: Propagate the SafeBrowsing download protection verdict to the DownloadItem. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add danger state to the download extension API. I couldn't find any static docs for that API. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/common/page_transition_types.h" 11 #include "content/public/common/page_transition_types.h"
12 12
13 // Contains information relating to the process of determining what to do with 13 // Contains information relating to the process of determining what to do with
14 // the download. 14 // the download.
15 struct DownloadStateInfo { 15 struct DownloadStateInfo {
16 DownloadStateInfo(); 16 DownloadStateInfo();
17 DownloadStateInfo(bool has_user_gesture, 17 DownloadStateInfo(bool has_user_gesture,
18 bool prompt_user_for_save_location); 18 bool prompt_user_for_save_location);
19 DownloadStateInfo(const FilePath& target, 19 DownloadStateInfo(const FilePath& target,
20 const FilePath& forced_name, 20 const FilePath& forced_name,
21 bool has_user_gesture, 21 bool has_user_gesture,
22 content::PageTransition transition_type, 22 content::PageTransition transition_type,
23 bool prompt_user_for_save_location, 23 bool prompt_user_for_save_location,
24 int uniquifier, 24 int uniquifier,
25 bool dangerous_file, 25 bool dangerous_file,
26 bool dangerous_url); 26 bool dangerous_url,
27 bool dangerous_content,
28 bool needs_quarantine_file);
27 29
28 // Indicates if the download is dangerous. 30 // Indicates if the download is dangerous.
29 CONTENT_EXPORT bool IsDangerous() const; 31 CONTENT_EXPORT bool IsDangerous() const;
30 32
31 // The original name for a dangerous download, specified by the request. 33 // The original name for a dangerous download, specified by the request.
32 FilePath target_name; 34 FilePath target_name;
33 35
34 // The path where we save the download. Typically generated. 36 // The path where we save the download. Typically generated.
35 FilePath suggested_path; 37 FilePath suggested_path;
36 38
(...skipping 12 matching lines...) Expand all
49 // False if the UI should be suppressed and the download performed to the 51 // False if the UI should be suppressed and the download performed to the
50 // default location. 52 // default location.
51 bool prompt_user_for_save_location; 53 bool prompt_user_for_save_location;
52 54
53 // True if this download file is potentially dangerous (ex: exe, dll, ...). 55 // True if this download file is potentially dangerous (ex: exe, dll, ...).
54 bool is_dangerous_file; 56 bool is_dangerous_file;
55 57
56 // If safebrowsing believes this URL leads to malware. 58 // If safebrowsing believes this URL leads to malware.
57 bool is_dangerous_url; 59 bool is_dangerous_url;
58 60
61 // If safebrowsing believes this content to be malicious.
62 bool is_dangerous_content;
63
64 // True if the file is potentially dangerous. If true, the download content
65 // will be written to a temporary file that isn't easily accessbile to the
66 // user.
67 bool needs_quarantine_file;
68
59 // True if this download's file name was specified initially. 69 // True if this download's file name was specified initially.
60 FilePath force_file_name; 70 FilePath force_file_name;
61 }; 71 };
62 72
63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_ 73 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698