OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/browser/safe_browsing/unverified_download_field_trial.h" | 5 #include "chrome/browser/safe_browsing/unverified_download_field_trial.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "build/build_config.h" |
14 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/common/safe_browsing/download_protection_util.h" | 16 #include "chrome/common/safe_browsing/download_protection_util.h" |
16 #include "components/variations/variations_associated_data.h" | 17 #include "components/variations/variations_associated_data.h" |
17 | 18 |
18 namespace safe_browsing { | 19 namespace safe_browsing { |
19 | 20 |
20 const char kUnverifiedDownloadFieldTrialName[] = | 21 const char kUnverifiedDownloadFieldTrialName[] = |
21 "SafeBrowsingUnverifiedDownloads"; | 22 "SafeBrowsingUnverifiedDownloads"; |
22 | 23 |
23 const char kUnverifiedDownloadFieldTrialDisableByParameter[] = | 24 const char kUnverifiedDownloadFieldTrialDisableByParameter[] = |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if (parameters.count(kUnverifiedDownloadFieldTrialBlockSBTypesParam) && | 94 if (parameters.count(kUnverifiedDownloadFieldTrialBlockSBTypesParam) && |
94 !parameters[kUnverifiedDownloadFieldTrialBlockSBTypesParam].empty() && | 95 !parameters[kUnverifiedDownloadFieldTrialBlockSBTypesParam].empty() && |
95 download_protection_util::IsSupportedBinaryFile(file)) | 96 download_protection_util::IsSupportedBinaryFile(file)) |
96 return false; | 97 return false; |
97 } | 98 } |
98 | 99 |
99 return true; | 100 return true; |
100 } | 101 } |
101 | 102 |
102 } // namespace safe_browsing | 103 } // namespace safe_browsing |
OLD | NEW |