| 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), |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 : target_name(target), | 35 : target_name(target), |
| 36 path_uniquifier(uniquifier), | 36 path_uniquifier(uniquifier), |
| 37 has_user_gesture(has_user_gesture), | 37 has_user_gesture(has_user_gesture), |
| 38 transition_type(transition_type), | 38 transition_type(transition_type), |
| 39 prompt_user_for_save_location(prompt_user_for_save_location), | 39 prompt_user_for_save_location(prompt_user_for_save_location), |
| 40 danger(danger_type), | 40 danger(danger_type), |
| 41 force_file_name(forced_name) { | 41 force_file_name(forced_name) { |
| 42 } | 42 } |
| 43 | 43 |
| 44 bool DownloadStateInfo::IsDangerous() const { | 44 bool DownloadStateInfo::IsDangerous() const { |
| 45 // TODO(noelutz): At this point we can't mark the download as dangerous | 45 // TODO(noelutz): At this point only the windows views UI supports |
| 46 // if it's content is dangerous because the UI doesn't yet support it. | 46 // warnings based on dangerous content. |
| 47 // Once the UI has been changed we should return true when the danger | 47 #ifdef OS_WIN |
| 48 // type is set to DANGEROUS_CONTENT. | |
| 49 // |dangerous_content| is true. | |
| 50 return (danger == DANGEROUS_FILE || | 48 return (danger == DANGEROUS_FILE || |
| 51 danger == DANGEROUS_URL); | 49 danger == DANGEROUS_URL || |
| 50 danger == DANGEROUS_CONTENT); |
| 51 #else |
| 52 return (danger == DANGEROUS_FILE || danger == DANGEROUS_URL); |
| 53 #endif |
| 52 } | 54 } |
| OLD | NEW |