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 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 }, | 2090 }, |
2091 #if defined(OS_CHROMEOS) | 2091 #if defined(OS_CHROMEOS) |
2092 { | 2092 { |
2093 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA | 2093 "enable-wifi-credential-sync", // FLAGS:RECORD_UMA |
2094 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME, | 2094 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_NAME, |
2095 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION, | 2095 IDS_FLAGS_ENABLE_WIFI_CREDENTIAL_SYNC_DESCRIPTION, |
2096 kOsCrOS, | 2096 kOsCrOS, |
2097 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync) | 2097 SINGLE_VALUE_TYPE(switches::kEnableWifiCredentialSync) |
2098 }, | 2098 }, |
2099 #endif | 2099 #endif |
| 2100 #if defined(OS_ANDROID) |
| 2101 { |
| 2102 "enable-data-reduction-proxy-bypass-warning", |
| 2103 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_NAME, |
| 2104 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_BYPASS_WARNING_DESCRIPTION, |
| 2105 kOsAndroid, |
| 2106 SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: |
| 2107 kEnableDataReductionProxyBypassWarning) |
| 2108 }, |
| 2109 #endif |
2100 | 2110 |
2101 // NOTE: Adding new command-line switches requires adding corresponding | 2111 // NOTE: Adding new command-line switches requires adding corresponding |
2102 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2112 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2103 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2113 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2104 }; | 2114 }; |
2105 | 2115 |
2106 const Experiment* experiments = kExperiments; | 2116 const Experiment* experiments = kExperiments; |
2107 size_t num_experiments = arraysize(kExperiments); | 2117 size_t num_experiments = arraysize(kExperiments); |
2108 | 2118 |
2109 // Stores and encapsulates the little state that about:flags has. | 2119 // Stores and encapsulates the little state that about:flags has. |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && | 2224 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
2215 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && | 2225 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && |
2216 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2226 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
2217 return true; | 2227 return true; |
2218 } | 2228 } |
2219 // enable-data-reduction-proxy-alt is only available for the Dev channel. | 2229 // enable-data-reduction-proxy-alt is only available for the Dev channel. |
2220 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && | 2230 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && |
2221 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2231 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
2222 return true; | 2232 return true; |
2223 } | 2233 } |
| 2234 // enable-data-reduction-proxy-bypass-warning is only available for Chromium |
| 2235 // builds and Canary/Dev channel. |
| 2236 if (!strcmp("enable-data-reduction-proxy-bypass-warning", |
| 2237 experiment.internal_name) && |
| 2238 chrome::VersionInfo::GetChannel() != |
| 2239 chrome::VersionInfo::CHANNEL_UNKNOWN && |
| 2240 chrome::VersionInfo::GetChannel() != |
| 2241 chrome::VersionInfo::CHANNEL_CANARY && |
| 2242 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
| 2243 return true; |
| 2244 } |
2224 #endif | 2245 #endif |
2225 | 2246 |
2226 return false; | 2247 return false; |
2227 } | 2248 } |
2228 | 2249 |
2229 | 2250 |
2230 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't | 2251 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
2231 // enabled on the current platform. | 2252 // enabled on the current platform. |
2232 void GetSanitizedEnabledFlagsForCurrentPlatform( | 2253 void GetSanitizedEnabledFlagsForCurrentPlatform( |
2233 FlagsStorage* flags_storage, std::set<std::string>* result) { | 2254 FlagsStorage* flags_storage, std::set<std::string>* result) { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2669 } | 2690 } |
2670 | 2691 |
2671 const Experiment* GetExperiments(size_t* count) { | 2692 const Experiment* GetExperiments(size_t* count) { |
2672 *count = num_experiments; | 2693 *count = num_experiments; |
2673 return experiments; | 2694 return experiments; |
2674 } | 2695 } |
2675 | 2696 |
2676 } // namespace testing | 2697 } // namespace testing |
2677 | 2698 |
2678 } // namespace about_flags | 2699 } // namespace about_flags |
OLD | NEW |