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

Side by Side Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc

Issue 2869863002: Enable QUIC for non core data saver proxies (Closed)
Patch Set: Reorder functions Created 3 years, 7 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 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 return false; 233 return false;
234 } 234 }
235 if (base::StartsWith(FieldTrialList::FindFullName(kQuicFieldTrial), kDisabled, 235 if (base::StartsWith(FieldTrialList::FindFullName(kQuicFieldTrial), kDisabled,
236 base::CompareCase::SENSITIVE)) { 236 base::CompareCase::SENSITIVE)) {
237 return false; 237 return false;
238 } 238 }
239 // QUIC is enabled by default. 239 // QUIC is enabled by default.
240 return true; 240 return true;
241 } 241 }
242 242
243 bool IsQuicEnabledForNonCoreProxies() {
244 DCHECK(IsIncludedInQuicFieldTrial());
245 std::map<std::string, std::string> params;
246 variations::GetVariationParams(GetQuicFieldTrialName(), &params);
247 return GetStringValueForVariationParamWithDefaultValue(
248 params, "enable_quic_non_core_proxies", "false") == "true";
249 }
250
243 const char* GetQuicFieldTrialName() { 251 const char* GetQuicFieldTrialName() {
244 return kQuicFieldTrial; 252 return kQuicFieldTrial;
245 } 253 }
246 254
247 bool IsBrotliAcceptEncodingEnabled() { 255 bool IsBrotliAcceptEncodingEnabled() {
248 // Brotli encoding is enabled by default since the data reduction proxy server 256 // Brotli encoding is enabled by default since the data reduction proxy server
249 // controls when to serve Brotli encoded content. It can be disabled in 257 // controls when to serve Brotli encoded content. It can be disabled in
250 // Chromium only if Chromium belongs to a field trial group whose name starts 258 // Chromium only if Chromium belongs to a field trial group whose name starts
251 // with "Disabled". 259 // with "Disabled".
252 return !base::StartsWith(base::FieldTrialList::FindFullName( 260 return !base::StartsWith(base::FieldTrialList::FindFullName(
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698