OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 5 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 bool IsZeroRttQuicEnabled() { | 244 bool IsZeroRttQuicEnabled() { |
245 if (!IsIncludedInQuicFieldTrial()) | 245 if (!IsIncludedInQuicFieldTrial()) |
246 return false; | 246 return false; |
247 std::map<std::string, std::string> params; | 247 std::map<std::string, std::string> params; |
248 variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms); | 248 variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms); |
249 return GetStringValueForVariationParamWithDefaultValue( | 249 return GetStringValueForVariationParamWithDefaultValue( |
250 params, "enable_zero_rtt", "false") == "true"; | 250 params, "enable_zero_rtt", "false") == "true"; |
251 } | 251 } |
252 | 252 |
| 253 bool IsQuicForNonCoreProxiesEnabled() { |
| 254 DCHECK(IsIncludedInQuicFieldTrial()); |
| 255 std::map<std::string, std::string> params; |
| 256 variations::GetVariationParams(GetQuicFieldTrialName(), ¶ms); |
| 257 return GetStringValueForVariationParamWithDefaultValue( |
| 258 params, "enable_quic_non_core_proxies", "false") == "true"; |
| 259 } |
| 260 |
253 bool IsBrotliAcceptEncodingEnabled() { | 261 bool IsBrotliAcceptEncodingEnabled() { |
254 // Brotli encoding is enabled by default since the data reduction proxy server | 262 // Brotli encoding is enabled by default since the data reduction proxy server |
255 // controls when to serve Brotli encoded content. It can be disabled in | 263 // controls when to serve Brotli encoded content. It can be disabled in |
256 // Chromium only if Chromium belongs to a field trial group whose name starts | 264 // Chromium only if Chromium belongs to a field trial group whose name starts |
257 // with "Disabled". | 265 // with "Disabled". |
258 return !base::StartsWith(base::FieldTrialList::FindFullName( | 266 return !base::StartsWith(base::FieldTrialList::FindFullName( |
259 "DataReductionProxyBrotliAcceptEncoding"), | 267 "DataReductionProxyBrotliAcceptEncoding"), |
260 kDisabled, base::CompareCase::SENSITIVE); | 268 kDisabled, base::CompareCase::SENSITIVE); |
261 } | 269 } |
262 | 270 |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 std::string DataReductionProxyParams::GetDefaultFallbackOrigin() const { | 532 std::string DataReductionProxyParams::GetDefaultFallbackOrigin() const { |
525 return kDefaultFallbackOrigin; | 533 return kDefaultFallbackOrigin; |
526 } | 534 } |
527 | 535 |
528 std::string DataReductionProxyParams::GetDefaultSecureProxyCheckURL() const { | 536 std::string DataReductionProxyParams::GetDefaultSecureProxyCheckURL() const { |
529 return kDefaultSecureProxyCheckUrl; | 537 return kDefaultSecureProxyCheckUrl; |
530 } | 538 } |
531 | 539 |
532 | 540 |
533 } // namespace data_reduction_proxy | 541 } // namespace data_reduction_proxy |
OLD | NEW |