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

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

Issue 9621007: Add new danger type for uncommon or unknown downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased only Created 8 years, 9 months 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) 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698