OLD | NEW |
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(PageTransition::LINK), |
12 prompt_user_for_save_location(false), | 13 prompt_user_for_save_location(false), |
13 is_dangerous_file(false), | 14 is_dangerous_file(false), |
14 is_dangerous_url(false), | 15 is_dangerous_url(false), |
15 is_extension_install(false) { | 16 is_extension_install(false) { |
16 } | 17 } |
17 | 18 |
18 DownloadStateInfo::DownloadStateInfo( | 19 DownloadStateInfo::DownloadStateInfo( |
19 bool has_user_gesture, | 20 bool has_user_gesture, |
20 bool prompt_user_for_save_location) | 21 bool prompt_user_for_save_location) |
21 : path_uniquifier(0), | 22 : path_uniquifier(0), |
22 has_user_gesture(has_user_gesture), | 23 has_user_gesture(has_user_gesture), |
| 24 transition_type(PageTransition::LINK), |
23 prompt_user_for_save_location(prompt_user_for_save_location), | 25 prompt_user_for_save_location(prompt_user_for_save_location), |
24 is_dangerous_file(false), | 26 is_dangerous_file(false), |
25 is_dangerous_url(false), | 27 is_dangerous_url(false), |
26 is_extension_install(false) { | 28 is_extension_install(false) { |
27 } | 29 } |
28 | 30 |
29 DownloadStateInfo::DownloadStateInfo( | 31 DownloadStateInfo::DownloadStateInfo( |
30 const FilePath& target, | 32 const FilePath& target, |
31 const FilePath& forced_name, | 33 const FilePath& forced_name, |
32 bool has_user_gesture, | 34 bool has_user_gesture, |
| 35 PageTransition::Type transition_type, |
33 bool prompt_user_for_save_location, | 36 bool prompt_user_for_save_location, |
34 int uniquifier, | 37 int uniquifier, |
35 bool dangerous_file, | 38 bool dangerous_file, |
36 bool dangerous_url, | 39 bool dangerous_url, |
37 bool extension_install) | 40 bool extension_install) |
38 : target_name(target), | 41 : target_name(target), |
39 path_uniquifier(uniquifier), | 42 path_uniquifier(uniquifier), |
40 has_user_gesture(has_user_gesture), | 43 has_user_gesture(has_user_gesture), |
| 44 transition_type(transition_type), |
41 prompt_user_for_save_location(prompt_user_for_save_location), | 45 prompt_user_for_save_location(prompt_user_for_save_location), |
42 is_dangerous_file(dangerous_file), | 46 is_dangerous_file(dangerous_file), |
43 is_dangerous_url(dangerous_url), | 47 is_dangerous_url(dangerous_url), |
44 is_extension_install(extension_install), | 48 is_extension_install(extension_install), |
45 force_file_name(forced_name) { | 49 force_file_name(forced_name) { |
46 } | 50 } |
47 | 51 |
48 bool DownloadStateInfo::IsDangerous() const { | 52 bool DownloadStateInfo::IsDangerous() const { |
49 return is_dangerous_url || is_dangerous_file; | 53 return is_dangerous_url || is_dangerous_file; |
50 } | 54 } |
OLD | NEW |