| 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 #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/page_transition_types.h" | 11 #include "content/common/page_transition_types.h" |
| 11 | 12 |
| 12 // 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 |
| 13 // the download. | 14 // the download. |
| 14 struct DownloadStateInfo { | 15 struct DownloadStateInfo { |
| 15 DownloadStateInfo(); | 16 DownloadStateInfo(); |
| 16 DownloadStateInfo(bool has_user_gesture, | 17 DownloadStateInfo(bool has_user_gesture, |
| 17 bool prompt_user_for_save_location); | 18 bool prompt_user_for_save_location); |
| 18 DownloadStateInfo(const FilePath& target, | 19 DownloadStateInfo(const FilePath& target, |
| 19 const FilePath& forced_name, | 20 const FilePath& forced_name, |
| 20 bool has_user_gesture, | 21 bool has_user_gesture, |
| 21 PageTransition::Type transition_type, | 22 PageTransition::Type transition_type, |
| 22 bool prompt_user_for_save_location, | 23 bool prompt_user_for_save_location, |
| 23 int uniquifier, | 24 int uniquifier, |
| 24 bool dangerous_file, | 25 bool dangerous_file, |
| 25 bool dangerous_url); | 26 bool dangerous_url); |
| 26 | 27 |
| 27 // Indicates if the download is dangerous. | 28 // Indicates if the download is dangerous. |
| 28 bool IsDangerous() const; | 29 CONTENT_EXPORT bool IsDangerous() const; |
| 29 | 30 |
| 30 // The original name for a dangerous download, specified by the request. | 31 // The original name for a dangerous download, specified by the request. |
| 31 FilePath target_name; | 32 FilePath target_name; |
| 32 | 33 |
| 33 // The path where we save the download. Typically generated. | 34 // The path where we save the download. Typically generated. |
| 34 FilePath suggested_path; | 35 FilePath suggested_path; |
| 35 | 36 |
| 36 // A number that should be added to the suggested path to make it unique. | 37 // A number that should be added to the suggested path to make it unique. |
| 37 // 0 means no number should be appended. It is eventually incorporated | 38 // 0 means no number should be appended. It is eventually incorporated |
| 38 // into the final file name. | 39 // into the final file name. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 53 bool is_dangerous_file; | 54 bool is_dangerous_file; |
| 54 | 55 |
| 55 // If safebrowsing believes this URL leads to malware. | 56 // If safebrowsing believes this URL leads to malware. |
| 56 bool is_dangerous_url; | 57 bool is_dangerous_url; |
| 57 | 58 |
| 58 // True if this download's file name was specified initially. | 59 // True if this download's file name was specified initially. |
| 59 FilePath force_file_name; | 60 FilePath force_file_name; |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_ | 63 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_STATE_INFO_H_ |
| OLD | NEW |