OLD | NEW |
(Empty) | |
| 1 |
| 2 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. |
| 5 |
| 6 #include "chrome/browser/download/download_state_info.h" |
| 7 |
| 8 #include "chrome/browser/download/download_item.h" |
| 9 |
| 10 DownloadStateInfo::DownloadStateInfo() |
| 11 : path_uniquifier(0), |
| 12 has_user_gesture(false), |
| 13 prompt_user_for_save_location(false), |
| 14 is_dangerous_file(false), |
| 15 is_dangerous_url(false), |
| 16 is_extension_install(false) { |
| 17 } |
| 18 |
| 19 DownloadStateInfo::DownloadStateInfo( |
| 20 bool has_user_gesture, |
| 21 bool prompt_user_for_save_location) |
| 22 : path_uniquifier(0), |
| 23 has_user_gesture(has_user_gesture), |
| 24 prompt_user_for_save_location(prompt_user_for_save_location), |
| 25 is_dangerous_file(false), |
| 26 is_dangerous_url(false), |
| 27 is_extension_install(false) { |
| 28 } |
| 29 |
| 30 DownloadStateInfo::DownloadStateInfo( |
| 31 const FilePath& target, |
| 32 const FilePath& forced_name, |
| 33 bool has_user_gesture, |
| 34 bool prompt_user_for_save_location, |
| 35 int uniquifier, |
| 36 bool dangerous_file, |
| 37 bool dangerous_url, |
| 38 bool extension_install) |
| 39 : target_name(target), |
| 40 path_uniquifier(uniquifier), |
| 41 has_user_gesture(has_user_gesture), |
| 42 prompt_user_for_save_location(prompt_user_for_save_location), |
| 43 is_dangerous_file(dangerous_file), |
| 44 is_dangerous_url(dangerous_url), |
| 45 is_extension_install(extension_install), |
| 46 force_file_name(forced_name) { |
| 47 } |
| 48 |
| 49 bool DownloadStateInfo::IsDangerous() const { |
| 50 return is_dangerous_url || is_dangerous_file; |
| 51 } |
OLD | NEW |