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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 2907463002: Split HttpNetworkSession::Params into two structs. (Closed)
Patch Set: Response to comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 4c602012a01396c17b0306ffcbbc1cbedd0126ba..110105cbd63cb21150bd71b0f413caabef1667bf 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -114,25 +114,28 @@ void TestURLRequestContext::Init() {
// Make sure we haven't been passed an object we're not going to use.
EXPECT_FALSE(client_socket_factory_);
} else {
- HttpNetworkSession::Params params;
-
+ HttpNetworkSession::Params session_params;
if (http_network_session_params_)
- params = *http_network_session_params_;
- params.client_socket_factory = client_socket_factory();
- params.proxy_delegate = proxy_delegate();
- params.host_resolver = host_resolver();
- params.cert_verifier = cert_verifier();
- params.cert_transparency_verifier = cert_transparency_verifier();
- params.ct_policy_enforcer = ct_policy_enforcer();
- params.transport_security_state = transport_security_state();
- params.proxy_service = proxy_service();
- params.ssl_config_service = ssl_config_service();
- params.http_auth_handler_factory = http_auth_handler_factory();
- params.http_server_properties = http_server_properties();
- params.net_log = net_log();
- params.channel_id_service = channel_id_service();
+ session_params = *http_network_session_params_;
+
+ HttpNetworkSession::Context session_context;
+ if (http_network_session_context_)
+ session_context = *http_network_session_context_;
+ session_context.client_socket_factory = client_socket_factory();
+ session_context.proxy_delegate = proxy_delegate();
+ session_context.host_resolver = host_resolver();
+ session_context.cert_verifier = cert_verifier();
+ session_context.cert_transparency_verifier = cert_transparency_verifier();
+ session_context.ct_policy_enforcer = ct_policy_enforcer();
+ session_context.transport_security_state = transport_security_state();
+ session_context.proxy_service = proxy_service();
+ session_context.ssl_config_service = ssl_config_service();
+ session_context.http_auth_handler_factory = http_auth_handler_factory();
+ session_context.http_server_properties = http_server_properties();
+ session_context.net_log = net_log();
+ session_context.channel_id_service = channel_id_service();
context_storage_.set_http_network_session(
- base::MakeUnique<HttpNetworkSession>(params));
+ base::MakeUnique<HttpNetworkSession>(session_params, session_context));
context_storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
context_storage_.http_network_session(),
HttpCache::DefaultBackend::InMemory(0), true /* is_main_cache */));
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698