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

Side by Side Diff: chrome/browser/safe_browsing/unverified_download_field_trial.h

Issue 1409003002: [SafeBrowsing] Block dangerous unchecked downloads based on a Finch trial. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 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_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_FIELD_TRIAL_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_FIELD_TRIAL_H_
7
8 namespace base {
9 class FilePath;
10 }
11
12 namespace safe_browsing {
13
14 // Unverified Download Field Trial
15 //
16 // It is possible in some circumstances to download a file without invoking
17 // SafeBrowsing to verify the source URLs or the downloaded contents. Ideally
18 // all code paths that writes untrusted contents to disk in a user discoverable
19 // manner would invoke SafeBrowsing. But until all such code paths are properly
20 // plumbed, this field trial will help control the behavior of known unverified
21 // code paths.
22
23 extern const char kUnverifiedDownloadFieldTrialName[];
24
25 // The trial groups are:
26 //
27 // * DisableAll : Disables all unverified downloads regardless of whether the
28 // specific file in question is potentially dangerous or handled by Safe
29 // Browsing at all.
30 extern const char kUnverifiedDownloadFieldTrialDisableAll[];
31
32 // * DisableByParameter : Decides the fate of unverified downloads based on
33 // whether the file type matches a whitelist and a blacklist specified as a
34 // parameter to this trial group. Any file type that doesn't match either of
35 // these lists will default to being allowed.
36 extern const char kUnverifiedDownloadFieldTrialDisableByParameter[];
37
38 // The parameters are:
39 //
40 // - 'whitelist' : A comma separated list of file types including leading
41 // extension separator. E.g. ".abc,.def" would match both foo.abc and
42 // foo.def, but not foo.txt. Any matching file will be allowed to be
43 // downloaded.
44 extern const char kUnverifiedDownloadFieldTrialWhitelistParam[];
45
46 // - 'blacklist' : Similar in format to 'whitelist' but causes matching file
47 // types to be disallowed from downloading.
48 extern const char kUnverifiedDownloadFieldTrialBlacklistParam[];
49
50 // * DisableSBTypesAndByParameter : Applies the whitelist and blacklist as
51 // described in DisableByParameter. However, any file type that doesn't
52 // match either list but is considered supported by SafeBrowsing will be
53 // blocked.
54 extern const char kUnverifiedDownloadFieldTrialDisableSBTypesAndByParameter[];
55
56 // Returns true if |file| is allowed to be downloaded based on the current field
57 // trial settings.
58 bool IsUnverifiedDownloadAllowedByFieldTrial(const base::FilePath& file);
59
60 } // namespace safe_browsing
61
62 #endif // CHROME_BROWSER_SAFE_BROWSING_UNVERIFIED_DOWNLOAD_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « chrome/browser/file_select_helper_unittest.cc ('k') | chrome/browser/safe_browsing/unverified_download_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698