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

Unified Diff: chrome/browser/profiles/off_the_record_profile_io_data.cc

Issue 10834215: Remove static variables from HttpStreamFactory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Apply network settings to jingle Created 8 years, 4 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
Index: chrome/browser/profiles/off_the_record_profile_io_data.cc
diff --git a/chrome/browser/profiles/off_the_record_profile_io_data.cc b/chrome/browser/profiles/off_the_record_profile_io_data.cc
index df070b55a0a3818f1ab901492e5ce64998cd244c..1269782f173abd8d97196ed958615ea767652a2e 100644
--- a/chrome/browser/profiles/off_the_record_profile_io_data.cc
+++ b/chrome/browser/profiles/off_the_record_profile_io_data.cc
@@ -29,6 +29,7 @@
#include "net/base/server_bound_cert_service.h"
#include "net/ftp/ftp_network_layer.h"
#include "net/http/http_cache.h"
+#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
#include "net/url_request/file_protocol_handler.h"
#include "net/url_request/ftp_protocol_handler.h"
@@ -228,21 +229,37 @@ void OffTheRecordProfileIOData::LazyInitializeInternal(
switches::kTrustedSpdyProxy);
}
- net::HttpCache* cache =
- new net::HttpCache(main_context->host_resolver(),
- main_context->cert_verifier(),
- main_context->server_bound_cert_service(),
- main_context->transport_security_state(),
- main_context->proxy_service(),
- GetSSLSessionCacheShard(),
- main_context->ssl_config_service(),
- main_context->http_auth_handler_factory(),
- main_context->network_delegate(),
- main_context->http_server_properties(),
- main_context->net_log(),
- main_backend,
- trusted_spdy_proxy);
-
+ net::HttpNetworkSession::Params network_session_params;
+ network_session_params.host_resolver = main_context->host_resolver();
+ network_session_params.cert_verifier = main_context->cert_verifier();
+ network_session_params.server_bound_cert_service =
+ main_context->server_bound_cert_service();
+ network_session_params.transport_security_state =
+ main_context->transport_security_state();
+ network_session_params.proxy_service = main_context->proxy_service();
+ network_session_params.ssl_session_cache_shard = GetSSLSessionCacheShard();
+ network_session_params.ssl_config_service =
+ main_context->ssl_config_service();
+ network_session_params.http_auth_handler_factory =
+ main_context->http_auth_handler_factory();
+ network_session_params.network_delegate = main_context->network_delegate();
+ network_session_params.http_server_properties =
+ main_context->http_server_properties();
+ network_session_params.net_log = main_context->net_log();
+ network_session_params.host_mapping_rules =
+ io_thread_globals->host_mapping_rules.get();
+ network_session_params.ignore_certificate_errors =
+ io_thread_globals->ignore_certificate_errors;
+ network_session_params.http_pipelining_enabled =
+ io_thread_globals->http_pipelining_enabled;
+ network_session_params.testing_fixed_http_port =
+ io_thread_globals->testing_fixed_http_port;
+ network_session_params.testing_fixed_https_port =
+ io_thread_globals->testing_fixed_https_port;
+ network_session_params.trusted_spdy_proxy = trusted_spdy_proxy;
+
+ net::HttpCache* cache = new net::HttpCache(
+ network_session_params, main_backend);
main_http_factory_.reset(cache);
main_context->set_http_transaction_factory(cache);
#if !defined(DISABLE_FTP_SUPPORT)

Powered by Google App Engine
This is Rietveld 408576698