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

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

Issue 8587042: Update the windows UI to support displaying a warning after the (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
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/download/download_item_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698