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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1342613002: Revert of Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/url_request/url_request_context_storage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 67820835487595fef6814837b3a816dd6fbbef50..508b182d745ca856e3a7a6c18ab8f1e5a24e6699 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -387,12 +387,9 @@
network_session_params.quic_connection_options =
http_network_session_params_.quic_connection_options;
- storage->set_http_network_session(
- make_scoped_ptr(new HttpNetworkSession(network_session_params)));
-
- HttpTransactionFactory* http_transaction_factory;
+ HttpTransactionFactory* http_transaction_factory = NULL;
if (http_cache_enabled_) {
- HttpCache::BackendFactory* http_cache_backend;
+ HttpCache::BackendFactory* http_cache_backend = NULL;
if (http_cache_params_.type == HttpCacheParams::DISK) {
http_cache_backend = new HttpCache::DefaultBackend(
DISK_CACHE, CACHE_BACKEND_DEFAULT, http_cache_params_.path,
@@ -402,11 +399,13 @@
HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
}
- http_transaction_factory = new HttpCache(storage->http_network_session(),
- http_cache_backend, true);
+ http_transaction_factory = new HttpCache(
+ network_session_params, http_cache_backend);
} else {
- http_transaction_factory =
- new HttpNetworkLayer(storage->http_network_session());
+ scoped_refptr<HttpNetworkSession> network_session(
+ new HttpNetworkSession(network_session_params));
+
+ http_transaction_factory = new HttpNetworkLayer(network_session.get());
}
storage->set_http_transaction_factory(http_transaction_factory);
« no previous file with comments | « net/spdy/spdy_test_util_common.cc ('k') | net/url_request/url_request_context_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698