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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params_test_utils.cc

Issue 586333003: Disable fallback support for alternative data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/browser/data_reduction_proxy_params_te st_utils.h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params_te st_utils.h"
6 6
7 namespace { 7 namespace {
8 // Test values to replace the values specified in preprocessor defines. 8 // Test values to replace the values specified in preprocessor defines.
9 static const char kDefaultDevOrigin[] = "https://dev.net:443/"; 9 static const char kDefaultDevOrigin[] = "https://dev.net:443/";
10 static const char kDefaultDevFallbackOrigin[] = "http://dev.net:80/"; 10 static const char kDefaultDevFallbackOrigin[] = "http://dev.net:80/";
(...skipping 10 matching lines...) Expand all
21 static const char kFlagAltOrigin[] = "https://alt.org:443/"; 21 static const char kFlagAltOrigin[] = "https://alt.org:443/";
22 static const char kFlagAltFallbackOrigin[] = "http://altfallback.org:80/"; 22 static const char kFlagAltFallbackOrigin[] = "http://altfallback.org:80/";
23 static const char kFlagProbeURL[] = "http://probe.org/"; 23 static const char kFlagProbeURL[] = "http://probe.org/";
24 } 24 }
25 25
26 namespace data_reduction_proxy { 26 namespace data_reduction_proxy {
27 TestDataReductionProxyParams::TestDataReductionProxyParams( 27 TestDataReductionProxyParams::TestDataReductionProxyParams(
28 int flags, unsigned int has_definitions) 28 int flags, unsigned int has_definitions)
29 : DataReductionProxyParams(flags, false), 29 : DataReductionProxyParams(flags, false),
30 has_definitions_(has_definitions) { 30 has_definitions_(has_definitions) {
31 init_result_ = Init(flags & DataReductionProxyParams::kAllowed, 31 init_result_ = Init(
32 flags & DataReductionProxyParams::kFallbackAllowed, 32 flags & DataReductionProxyParams::kAllowed,
33 flags & DataReductionProxyParams::kAlternativeAllowed); 33 flags & DataReductionProxyParams::kFallbackAllowed,
34 flags & DataReductionProxyParams::kAlternativeAllowed,
35 flags & DataReductionProxyParams::kAlternativeFallbackAllowed);
34 } 36 }
35 37
36 bool TestDataReductionProxyParams::init_result() const { 38 bool TestDataReductionProxyParams::init_result() const {
37 return init_result_; 39 return init_result_;
38 } 40 }
39 41
40 // Test values to replace the values specified in preprocessor defines. 42 // Test values to replace the values specified in preprocessor defines.
41 std::string TestDataReductionProxyParams::DefaultDevOrigin() { 43 std::string TestDataReductionProxyParams::DefaultDevOrigin() {
42 return kDefaultDevOrigin; 44 return kDefaultDevOrigin;
43 } 45 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 return GetDefinition( 138 return GetDefinition(
137 TestDataReductionProxyParams::HAS_PROBE_URL, kDefaultProbeURL); 139 TestDataReductionProxyParams::HAS_PROBE_URL, kDefaultProbeURL);
138 } 140 }
139 141
140 std::string TestDataReductionProxyParams::GetDefinition( 142 std::string TestDataReductionProxyParams::GetDefinition(
141 unsigned int has_def, 143 unsigned int has_def,
142 const std::string& definition) const { 144 const std::string& definition) const {
143 return ((has_definitions_ & has_def) ? definition : std::string()); 145 return ((has_definitions_ & has_def) ? definition : std::string());
144 } 146 }
145 } // namespace data_reduction_proxy 147 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698