| 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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 #endif // defined(OS_MACOSX) | 2160 #endif // defined(OS_MACOSX) |
| 2161 #if defined(OS_CHROMEOS) | 2161 #if defined(OS_CHROMEOS) |
| 2162 { | 2162 { |
| 2163 "enable-timezone-tracking", | 2163 "enable-timezone-tracking", |
| 2164 IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME, | 2164 IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_NAME, |
| 2165 IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, | 2165 IDS_FLAGS_ENABLE_RESOLVE_TIMEZONE_BY_GEOLOCATION_DESCRIPTION, |
| 2166 kOsCrOS, | 2166 kOsCrOS, |
| 2167 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTimeZoneTrackingOption) | 2167 SINGLE_VALUE_TYPE(chromeos::switches::kEnableTimeZoneTrackingOption) |
| 2168 }, | 2168 }, |
| 2169 #endif // defined(OS_CHROMEOS) | 2169 #endif // defined(OS_CHROMEOS) |
| 2170 { | |
| 2171 "enable-data-reduction-proxy-lo-fi", | |
| 2172 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_NAME, | |
| 2173 IDS_FLAGS_ENABLE_DATA_REDUCTION_PROXY_LO_FI_DESCRIPTION, | |
| 2174 kOsAll, | |
| 2175 SINGLE_VALUE_TYPE(data_reduction_proxy::switches:: | |
| 2176 kEnableDataReductionProxyLoFi) | |
| 2177 }, | |
| 2178 | 2170 |
| 2179 // NOTE: Adding new command-line switches requires adding corresponding | 2171 // NOTE: Adding new command-line switches requires adding corresponding |
| 2180 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2172 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
| 2181 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2173 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
| 2182 }; | 2174 }; |
| 2183 | 2175 |
| 2184 const Experiment* experiments = kExperiments; | 2176 const Experiment* experiments = kExperiments; |
| 2185 size_t num_experiments = arraysize(kExperiments); | 2177 size_t num_experiments = arraysize(kExperiments); |
| 2186 | 2178 |
| 2187 // Stores and encapsulates the little state that about:flags has. | 2179 // Stores and encapsulates the little state that about:flags has. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2292 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && | 2284 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && |
| 2293 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && | 2285 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && |
| 2294 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2286 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
| 2295 return true; | 2287 return true; |
| 2296 } | 2288 } |
| 2297 // enable-data-reduction-proxy-alt is only available for the Dev channel. | 2289 // enable-data-reduction-proxy-alt is only available for the Dev channel. |
| 2298 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && | 2290 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && |
| 2299 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { | 2291 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { |
| 2300 return true; | 2292 return true; |
| 2301 } | 2293 } |
| 2302 // enable-data-reduction-proxy-lo-fi is only available for Chromium builds and | |
| 2303 // the Canary/Dev channel. | |
| 2304 if (!strcmp("enable-data-reduction-proxy-lo-fi", experiment.internal_name) && | |
| 2305 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV && | |
| 2306 chrome::VersionInfo::GetChannel() != | |
| 2307 chrome::VersionInfo::CHANNEL_CANARY && | |
| 2308 chrome::VersionInfo::GetChannel() != | |
| 2309 chrome::VersionInfo::CHANNEL_UNKNOWN) { | |
| 2310 return true; | |
| 2311 } | |
| 2312 #endif | 2294 #endif |
| 2313 | 2295 |
| 2314 return false; | 2296 return false; |
| 2315 } | 2297 } |
| 2316 | 2298 |
| 2317 | 2299 |
| 2318 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't | 2300 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't |
| 2319 // enabled on the current platform. | 2301 // enabled on the current platform. |
| 2320 void GetSanitizedEnabledFlagsForCurrentPlatform( | 2302 void GetSanitizedEnabledFlagsForCurrentPlatform( |
| 2321 FlagsStorage* flags_storage, std::set<std::string>* result) { | 2303 FlagsStorage* flags_storage, std::set<std::string>* result) { |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2757 } | 2739 } |
| 2758 | 2740 |
| 2759 const Experiment* GetExperiments(size_t* count) { | 2741 const Experiment* GetExperiments(size_t* count) { |
| 2760 *count = num_experiments; | 2742 *count = num_experiments; |
| 2761 return experiments; | 2743 return experiments; |
| 2762 } | 2744 } |
| 2763 | 2745 |
| 2764 } // namespace testing | 2746 } // namespace testing |
| 2765 | 2747 |
| 2766 } // namespace about_flags | 2748 } // namespace about_flags |
| OLD | NEW |