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

Side by Side Diff: net/url_request/url_request_test_util.h

Issue 1579063002: Implement a skeleton version of Expect CT reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move expect ct into TransportSecurityState Created 4 years, 9 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 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <map> 10 #include <map>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 void set_http_network_session_params( 78 void set_http_network_session_params(
79 scoped_ptr<HttpNetworkSession::Params> params) { 79 scoped_ptr<HttpNetworkSession::Params> params) {
80 http_network_session_params_ = std::move(params); 80 http_network_session_params_ = std::move(params);
81 } 81 }
82 82
83 void SetSdchManager(scoped_ptr<SdchManager> sdch_manager) { 83 void SetSdchManager(scoped_ptr<SdchManager> sdch_manager) {
84 context_storage_.set_sdch_manager(std::move(sdch_manager)); 84 context_storage_.set_sdch_manager(std::move(sdch_manager));
85 } 85 }
86 86
87 CTPolicyEnforcer* ct_policy_enforcer() { return ct_policy_enforcer_; }
88 void set_ct_policy_enforcer(CTPolicyEnforcer* ct_policy_enforcer) {
89 ct_policy_enforcer_ = ct_policy_enforcer;
90 }
91
87 private: 92 private:
88 bool initialized_; 93 bool initialized_;
89 94
90 // Optional parameters to override default values. Note that values that 95 // Optional parameters to override default values. Note that values that
91 // point to other objects the TestURLRequestContext creates will be 96 // point to other objects the TestURLRequestContext creates will be
92 // overwritten. 97 // overwritten.
93 scoped_ptr<HttpNetworkSession::Params> http_network_session_params_; 98 scoped_ptr<HttpNetworkSession::Params> http_network_session_params_;
94 99
95 // Not owned: 100 // Not owned:
96 ClientSocketFactory* client_socket_factory_; 101 ClientSocketFactory* client_socket_factory_;
97 102
98 ProxyDelegate* proxy_delegate_; 103 ProxyDelegate* proxy_delegate_;
99 104
105 CTPolicyEnforcer* ct_policy_enforcer_;
106
100 protected: 107 protected:
101 URLRequestContextStorage context_storage_; 108 URLRequestContextStorage context_storage_;
102 }; 109 };
103 110
104 //----------------------------------------------------------------------------- 111 //-----------------------------------------------------------------------------
105 112
106 // Used to return a dummy context, which lives on the message loop 113 // Used to return a dummy context, which lives on the message loop
107 // given in the constructor. 114 // given in the constructor.
108 class TestURLRequestContextGetter : public URLRequestContextGetter { 115 class TestURLRequestContextGetter : public URLRequestContextGetter {
109 public: 116 public:
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 NetworkDelegate* network_delegate) const override; 419 NetworkDelegate* network_delegate) const override;
413 void set_main_intercept_job(scoped_ptr<URLRequestJob> job); 420 void set_main_intercept_job(scoped_ptr<URLRequestJob> job);
414 421
415 private: 422 private:
416 mutable scoped_ptr<URLRequestJob> main_intercept_job_; 423 mutable scoped_ptr<URLRequestJob> main_intercept_job_;
417 }; 424 };
418 425
419 } // namespace net 426 } // namespace net
420 427
421 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 428 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698