| 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 only the windows views UI supports | 45 // TODO(noelutz): At this point only the windows views and Linux GTK UI |
| 46 // warnings based on dangerous content. | 46 // supports warnings based on dangerous content. |
| 47 #ifdef OS_WIN | 47 #if defined(OS_WIN) || defined(TOOLKIT_GTK) |
| 48 return (danger == DANGEROUS_FILE || | 48 return (danger == DANGEROUS_FILE || |
| 49 danger == DANGEROUS_URL || | 49 danger == DANGEROUS_URL || |
| 50 danger == DANGEROUS_CONTENT); | 50 danger == DANGEROUS_CONTENT); |
| 51 #else | 51 #else |
| 52 return (danger == DANGEROUS_FILE || danger == DANGEROUS_URL); | 52 return (danger == DANGEROUS_FILE || danger == DANGEROUS_URL); |
| 53 #endif | 53 #endif |
| 54 } | 54 } |
| OLD | NEW |