Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/browser/download/download_state_info.cc

Issue 8588037: Updates to DownloadItemGtk for supporting download items marked as DANGEROUS_CONTENT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698