OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/browser/download_item.h" | 7 #include "content/public/browser/download_item.h" |
8 | 8 |
9 DownloadStateInfo::DownloadStateInfo() | 9 DownloadStateInfo::DownloadStateInfo() |
10 : path_uniquifier(0), | 10 : path_uniquifier(0), |
(...skipping 14 matching lines...) Expand all Loading... |
25 danger(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS), | 25 danger(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS), |
26 force_file_name(forced_name) { | 26 force_file_name(forced_name) { |
27 } | 27 } |
28 | 28 |
29 bool DownloadStateInfo::IsDangerous() const { | 29 bool DownloadStateInfo::IsDangerous() const { |
30 // TODO(noelutz): At this point only the windows views UI supports | 30 // TODO(noelutz): At this point only the windows views UI supports |
31 // warnings based on dangerous content. | 31 // warnings based on dangerous content. |
32 #ifdef OS_WIN | 32 #ifdef OS_WIN |
33 return (danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 33 return (danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
34 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || | 34 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL || |
35 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT); | 35 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT || |
| 36 danger == content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT); |
36 #else | 37 #else |
37 return (danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || | 38 return (danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE || |
38 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); | 39 danger == content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL); |
39 #endif | 40 #endif |
40 } | 41 } |
OLD | NEW |