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

Side by Side Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h

Issue 1871783002: Remove the Data Reduction Proxy TLS experiment code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PARAMS _TEST_UTILS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PARAMS _TEST_UTILS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PARAMS _TEST_UTILS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PARAMS _TEST_UTILS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
(...skipping 10 matching lines...) Expand all
21 21
22 namespace data_reduction_proxy { 22 namespace data_reduction_proxy {
23 23
24 class TestDataReductionProxyParams : public DataReductionProxyParams { 24 class TestDataReductionProxyParams : public DataReductionProxyParams {
25 public: 25 public:
26 // Used to emulate having constants defined by the preprocessor. 26 // Used to emulate having constants defined by the preprocessor.
27 enum HasNames { 27 enum HasNames {
28 HAS_NOTHING = 0x0, 28 HAS_NOTHING = 0x0,
29 HAS_ORIGIN = 0x2, 29 HAS_ORIGIN = 0x2,
30 HAS_FALLBACK_ORIGIN = 0x4, 30 HAS_FALLBACK_ORIGIN = 0x4,
31 HAS_SSL_ORIGIN = 0x08,
32 HAS_SECURE_PROXY_CHECK_URL = 0x40, 31 HAS_SECURE_PROXY_CHECK_URL = 0x40,
33 HAS_EVERYTHING = 0xff, 32 HAS_EVERYTHING = 0xff,
34 }; 33 };
35 34
36 TestDataReductionProxyParams(int flags, 35 TestDataReductionProxyParams(int flags,
37 unsigned int has_definitions); 36 unsigned int has_definitions);
38 bool init_result() const; 37 bool init_result() const;
39 38
40 void SetProxiesForHttp(const std::vector<net::ProxyServer>& proxies); 39 void SetProxiesForHttp(const std::vector<net::ProxyServer>& proxies);
41 40
42 // Test values to replace the values specified in preprocessor defines. 41 // Test values to replace the values specified in preprocessor defines.
43 static std::string DefaultOrigin(); 42 static std::string DefaultOrigin();
44 static std::string DefaultFallbackOrigin(); 43 static std::string DefaultFallbackOrigin();
45 static std::string DefaultSSLOrigin();
46 static std::string DefaultSecureProxyCheckURL(); 44 static std::string DefaultSecureProxyCheckURL();
47 45
48 static std::string FlagOrigin(); 46 static std::string FlagOrigin();
49 static std::string FlagFallbackOrigin(); 47 static std::string FlagFallbackOrigin();
50 static std::string FlagSSLOrigin();
51 static std::string FlagSecureProxyCheckURL(); 48 static std::string FlagSecureProxyCheckURL();
52 49
53 protected: 50 protected:
54 std::string GetDefaultOrigin() const override; 51 std::string GetDefaultOrigin() const override;
55 52
56 std::string GetDefaultFallbackOrigin() const override; 53 std::string GetDefaultFallbackOrigin() const override;
57 54
58 std::string GetDefaultSSLOrigin() const override;
59
60 std::string GetDefaultSecureProxyCheckURL() const override; 55 std::string GetDefaultSecureProxyCheckURL() const override;
61 56
62 private: 57 private:
63 std::string GetDefinition(unsigned int has_def, 58 std::string GetDefinition(unsigned int has_def,
64 const std::string& definition) const; 59 const std::string& definition) const;
65 60
66 unsigned int has_definitions_; 61 unsigned int has_definitions_;
67 bool init_result_; 62 bool init_result_;
68 }; 63 };
69 } // namespace data_reduction_proxy 64 } // namespace data_reduction_proxy
70 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PAR AMS_TEST_UTILS_H_ 65 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_PAR AMS_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698