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

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

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 missing file and fix some unit-tests 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 #include "content/browser/download/download_state_info.h" 5 #include "content/browser/download/download_state_info.h"
6 6
7 #include "content/browser/download/download_item.h" 7 #include "content/browser/download/download_item.h"
8 8
9 DownloadStateInfo::DownloadStateInfo() 9 DownloadStateInfo::DownloadStateInfo()
10 : path_uniquifier(0), 10 : path_uniquifier(0),
11 has_user_gesture(false), 11 has_user_gesture(false),
12 transition_type(content::PAGE_TRANSITION_LINK), 12 transition_type(content::PAGE_TRANSITION_LINK),
13 prompt_user_for_save_location(false), 13 prompt_user_for_save_location(false),
14 is_dangerous_file(false), 14 is_dangerous_file(false),
15 is_dangerous_url(false) { 15 is_dangerous_url(false),
16 is_dangerous_content(false),
17 needs_quarantine_file(false) {
16 } 18 }
17 19
18 DownloadStateInfo::DownloadStateInfo( 20 DownloadStateInfo::DownloadStateInfo(
19 bool has_user_gesture, 21 bool has_user_gesture,
20 bool prompt_user_for_save_location) 22 bool prompt_user_for_save_location)
21 : path_uniquifier(0), 23 : path_uniquifier(0),
22 has_user_gesture(has_user_gesture), 24 has_user_gesture(has_user_gesture),
23 transition_type(content::PAGE_TRANSITION_LINK), 25 transition_type(content::PAGE_TRANSITION_LINK),
24 prompt_user_for_save_location(prompt_user_for_save_location), 26 prompt_user_for_save_location(prompt_user_for_save_location),
25 is_dangerous_file(false), 27 is_dangerous_file(false),
26 is_dangerous_url(false) { 28 is_dangerous_url(false),
29 is_dangerous_content(false),
30 needs_quarantine_file(false) {
27 } 31 }
28 32
29 DownloadStateInfo::DownloadStateInfo( 33 DownloadStateInfo::DownloadStateInfo(
30 const FilePath& target, 34 const FilePath& target,
31 const FilePath& forced_name, 35 const FilePath& forced_name,
32 bool has_user_gesture, 36 bool has_user_gesture,
33 content::PageTransition transition_type, 37 content::PageTransition transition_type,
34 bool prompt_user_for_save_location, 38 bool prompt_user_for_save_location,
35 int uniquifier, 39 int uniquifier,
36 bool dangerous_file, 40 bool dangerous_file,
37 bool dangerous_url) 41 bool dangerous_url,
42 bool dangerous_content,
43 bool needs_tmp_file)
38 : target_name(target), 44 : target_name(target),
39 path_uniquifier(uniquifier), 45 path_uniquifier(uniquifier),
40 has_user_gesture(has_user_gesture), 46 has_user_gesture(has_user_gesture),
41 transition_type(transition_type), 47 transition_type(transition_type),
42 prompt_user_for_save_location(prompt_user_for_save_location), 48 prompt_user_for_save_location(prompt_user_for_save_location),
43 is_dangerous_file(dangerous_file), 49 is_dangerous_file(dangerous_file),
44 is_dangerous_url(dangerous_url), 50 is_dangerous_url(dangerous_url),
51 is_dangerous_content(dangerous_content),
52 needs_quarantine_file(needs_tmp_file),
45 force_file_name(forced_name) { 53 force_file_name(forced_name) {
46 } 54 }
47 55
48 bool DownloadStateInfo::IsDangerous() const { 56 bool DownloadStateInfo::IsDangerous() const {
49 return is_dangerous_url || is_dangerous_file; 57 return is_dangerous_url || is_dangerous_file || is_dangerous_content;
50 } 58 }
OLDNEW
« content/browser/download/download_item.h ('K') | « content/browser/download/download_state_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698