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

Unified Diff: chrome/browser/profiles/profile_io_data.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 | « chrome/browser/profiles/profile_io_data.h ('k') | components/gcm_driver/gcm_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_io_data.cc
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
index ffff2950ad36e98c3a53fd8b7048b6938e8701db..85815a83678555b58e707254d3669bc3d0f6f954 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -66,7 +66,6 @@
#include "net/base/network_quality_estimator.h"
#include "net/cert/cert_verifier.h"
#include "net/cookies/canonical_cookie.h"
-#include "net/http/http_network_session.h"
#include "net/http/http_transaction_factory.h"
#include "net/http/http_util.h"
#include "net/http/transport_security_persister.h"
@@ -1302,12 +1301,13 @@
resource_context_.reset();
}
-scoped_ptr<net::HttpNetworkSession> ProfileIOData::CreateHttpNetworkSession(
- const ProfileParams& profile_params) const {
+scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
+ const ProfileParams* profile_params,
+ net::HttpCache::BackendFactory* main_backend) const {
net::HttpNetworkSession::Params params;
net::URLRequestContext* context = main_request_context();
- IOThread* const io_thread = profile_params.io_thread;
+ IOThread* const io_thread = profile_params->io_thread;
io_thread->InitializeNetworkSessionParams(&params);
net::URLRequestContextBuilder::SetHttpNetworkSessionComponents(context,
@@ -1319,19 +1319,11 @@
if (data_reduction_proxy_io_data_.get())
params.proxy_delegate = data_reduction_proxy_io_data_->proxy_delegate();
- return scoped_ptr<net::HttpNetworkSession>(
- new net::HttpNetworkSession(params));
-}
-
-scoped_ptr<net::HttpCache> ProfileIOData::CreateMainHttpFactory(
- net::HttpNetworkSession* session,
- net::HttpCache::BackendFactory* main_backend) const {
- net::URLRequestContext* context = main_request_context();
+ net::HttpNetworkSession* session = new net::HttpNetworkSession(params);
return scoped_ptr<net::HttpCache>(new net::HttpCache(
new DevToolsNetworkTransactionFactory(
network_controller_handle_.GetController(), session),
- context->net_log(), main_backend,
- true /* set_up_quic_server_info */));
+ context->net_log(), main_backend));
}
scoped_ptr<net::HttpCache> ProfileIOData::CreateHttpFactory(
@@ -1340,8 +1332,7 @@
return scoped_ptr<net::HttpCache>(new net::HttpCache(
new DevToolsNetworkTransactionFactory(
network_controller_handle_.GetController(), shared_session),
- shared_session->net_log(), backend,
- true /* set_up_quic_server_info */));
+ shared_session->net_log(), backend));
}
void ProfileIOData::SetCookieSettingsForTesting(
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | components/gcm_driver/gcm_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698