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

Side by Side Diff: chrome/browser/download/download_extensions.h

Issue 5603008: Modify the "dangerous download" algorithm as follows. Original patch by Pier... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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/download/download_exe.cc ('k') | chrome/browser/download/download_extensions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSIONS_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSIONS_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/file_path.h"
12
13 namespace download_util {
14
15 enum DownloadDangerLevel {
16 NotDangerous,
17 AllowOnUserGesture,
18 Dangerous
19 };
20
21 // Determine the download danger level of a file.
22 DownloadDangerLevel GetFileDangerLevel(const FilePath& path);
23
24 // Determine the download danger level using a file extension.
25 DownloadDangerLevel GetFileExtensionDangerLevel(
26 const FilePath::StringType& extension);
27
28 // True if the download danger level of the file is NotDangerous.
29 bool IsFileSafe(const FilePath& path);
30
31 // True if the download danger level of the extension is NotDangerous.
32 bool IsFileExtensionSafe(const FilePath::StringType& extension);
33
34 // Tests if we think the server means for this mime_type to be executable.
35 bool IsExecutableMimeType(const std::string& mime_type);
36
37 } // namespace download_util
38
39 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_EXTENSIONS_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_exe.cc ('k') | chrome/browser/download/download_extensions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698