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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 791493015: Adding q=low to the Chrome-Proxy request header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase test fixes Created 5 years, 10 months 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
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
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 },
2170 2178
2171 // NOTE: Adding new command-line switches requires adding corresponding 2179 // NOTE: Adding new command-line switches requires adding corresponding
2172 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2180 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2173 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2181 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2174 }; 2182 };
2175 2183
2176 const Experiment* experiments = kExperiments; 2184 const Experiment* experiments = kExperiments;
2177 size_t num_experiments = arraysize(kExperiments); 2185 size_t num_experiments = arraysize(kExperiments);
2178 2186
2179 // Stores and encapsulates the little state that about:flags has. 2187 // Stores and encapsulates the little state that about:flags has.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2284 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && 2292 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2285 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA && 2293 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_BETA &&
2286 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { 2294 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2287 return true; 2295 return true;
2288 } 2296 }
2289 // enable-data-reduction-proxy-alt is only available for the Dev channel. 2297 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2290 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && 2298 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) &&
2291 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) { 2299 chrome::VersionInfo::GetChannel() != chrome::VersionInfo::CHANNEL_DEV) {
2292 return true; 2300 return true;
2293 } 2301 }
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 }
2294 #endif 2312 #endif
2295 2313
2296 return false; 2314 return false;
2297 } 2315 }
2298 2316
2299 2317
2300 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't 2318 // Variant of GetSanitizedEnabledFlags that also removes any flags that aren't
2301 // enabled on the current platform. 2319 // enabled on the current platform.
2302 void GetSanitizedEnabledFlagsForCurrentPlatform( 2320 void GetSanitizedEnabledFlagsForCurrentPlatform(
2303 FlagsStorage* flags_storage, std::set<std::string>* result) { 2321 FlagsStorage* flags_storage, std::set<std::string>* result) {
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2739 } 2757 }
2740 2758
2741 const Experiment* GetExperiments(size_t* count) { 2759 const Experiment* GetExperiments(size_t* count) {
2742 *count = num_experiments; 2760 *count = num_experiments;
2743 return experiments; 2761 return experiments;
2744 } 2762 }
2745 2763
2746 } // namespace testing 2764 } // namespace testing
2747 2765
2748 } // namespace about_flags 2766 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698