OLD | NEW |
---|---|
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 "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2057 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox) | 2057 SINGLE_VALUE_TYPE(switches::kEnableSeccompFilterSandbox) |
2058 }, | 2058 }, |
2059 #endif | 2059 #endif |
2060 { | 2060 { |
2061 "enable-touch-hover", | 2061 "enable-touch-hover", |
2062 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME, | 2062 IDS_FLAGS_ENABLE_TOUCH_HOVER_NAME, |
2063 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION, | 2063 IDS_FLAGS_ENABLE_TOUCH_HOVER_DESCRIPTION, |
2064 kOsAndroid, | 2064 kOsAndroid, |
2065 SINGLE_VALUE_TYPE("enable-touch-hover") | 2065 SINGLE_VALUE_TYPE("enable-touch-hover") |
2066 }, | 2066 }, |
2067 #if defined(OS_ANDROID) | |
2068 { | |
2069 "enable-data-reduction-proxy-bypass-warning", | |
2070 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME, | |
2071 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION, | |
2072 kOsAndroid, | |
2073 SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: | |
2074 kEnableDataReductionProxyBypassWarning) | |
2075 }, | |
2076 #endif | |
2067 | 2077 |
2068 // NOTE: Adding new command-line switches requires adding corresponding | 2078 // NOTE: Adding new command-line switches requires adding corresponding |
2069 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2079 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2070 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2080 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2071 }; | 2081 }; |
2072 | 2082 |
2073 const Experiment* experiments = kExperiments; | 2083 const Experiment* experiments = kExperiments; |
2074 size_t num_experiments = arraysize(kExperiments); | 2084 size_t num_experiments = arraysize(kExperiments); |
2075 | 2085 |
2076 // Stores and encapsulates the little state that about:flags has. | 2086 // Stores and encapsulates the little state that about:flags has. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2181 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && | 2191 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
2182 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && | 2192 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && |
2183 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2193 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
2184 return true; | 2194 return true; |
2185 } | 2195 } |
2186 // enable-data-reduction-proxy-alt is only available for the Dev channel. | 2196 // enable-data-reduction-proxy-alt is only available for the Dev channel. |
2187 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && | 2197 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && |
2188 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2198 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
2189 return true; | 2199 return true; |
2190 } | 2200 } |
2201 // enable-data-reduction-proxy-alt is only available for the Chromium builds | |
bengr
2014/12/17 00:30:19
Fix the comment.
megjablon
2014/12/23 02:18:02
Done.
| |
2202 // and Canary/Dev channel. | |
2203 if (!strcmp("enable-data-reduction-proxy-bypass-warning", | |
2204 experiment.internal_name) && | |
2205 chrome::VersionInfo::GetChannel() != | |
2206 chrome::VersionInfo::CHANNEL_UNKNOWN && | |
2207 chrome::VersionInfo::GetChannel() != | |
2208 chrome::VersionInfo::CHANNEL_CANARY && | |
2209 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | |
2210 return true; | |
2211 } | |
2191 #endif | 2212 #endif |
2192 | 2213 |
2193 return false; | 2214 return false; |
2194 } | 2215 } |
2195 | 2216 |
2196 | 2217 |
2197 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't | 2218 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
2198 // enabled on the current platform. | 2219 // enabled on the current platform. |
2199 void GetSanitizedEnabledFlagsForCurrentPlatform( | 2220 void GetSanitizedEnabledFlagsForCurrentPlatform( |
2200 FlagsStorage* flags_storage, std::set<std::string>* result) { | 2221 FlagsStorage* flags_storage, std::set<std::string>* result) { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2636 } | 2657 } |
2637 | 2658 |
2638 const Experiment* GetExperiments(size_t* count) { | 2659 const Experiment* GetExperiments(size_t* count) { |
2639 *count = num_experiments; | 2660 *count = num_experiments; |
2640 return experiments; | 2661 return experiments; |
2641 } | 2662 } |
2642 | 2663 |
2643 } // namespace testing | 2664 } // namespace testing |
2644 | 2665 |
2645 } // namespace about_flags | 2666 } // namespace about_flags |
OLD | NEW |