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

Unified Diff: android_webview/browser/net/aw_url_request_context_getter.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 | « android_webview/browser/net/aw_url_request_context_getter.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/aw_url_request_context_getter.cc
diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc
index f54103c590cb09a04b283974b558d772cb36a7a0..def5f81e4de7ad17a13077ba0fc88162185aa9b4 100644
--- a/android_webview/browser/net/aw_url_request_context_getter.cc
+++ b/android_webview/browser/net/aw_url_request_context_getter.cc
@@ -182,10 +182,11 @@
const base::FilePath& cache_path, net::CookieStore* cookie_store,
scoped_ptr<net::ProxyConfigService> config_service)
: cache_path_(cache_path),
- net_log_(new net::NetLog()),
- proxy_config_service_(config_service.Pass()),
cookie_store_(cookie_store),
- http_user_agent_settings_(new AwHttpUserAgentSettings()) {
+ net_log_(new net::NetLog()) {
+ proxy_config_service_ = config_service.Pass();
+ http_user_agent_settings_.reset(
+ new AwHttpUserAgentSettings());
// CreateSystemProxyConfigService for Android must be called on main thread.
DCHECK_CURRENTLY_ON(BrowserThread::UI);
}
@@ -230,19 +231,17 @@
PopulateNetworkSessionParams(url_request_context_.get(),
&network_session_params);
- http_network_session_.reset(
- new net::HttpNetworkSession(network_session_params));
- main_http_factory_.reset(new net::HttpCache(
- http_network_session_.get(),
+ net::HttpCache* main_cache = new net::HttpCache(
+ network_session_params,
new net::HttpCache::DefaultBackend(
net::DISK_CACHE,
net::CACHE_BACKEND_SIMPLE,
cache_path_,
20 * 1024 * 1024, // 20M
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)),
- true /* set_up_quic_server_info */));
-
- url_request_context_->set_http_transaction_factory(main_http_factory_.get());
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE)));
+
+ main_http_factory_.reset(main_cache);
+ url_request_context_->set_http_transaction_factory(main_cache);
job_factory_ = CreateJobFactory(&protocol_handlers_,
request_interceptors_.Pass());
« no previous file with comments | « android_webview/browser/net/aw_url_request_context_getter.h ('k') | chrome/browser/io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698