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

Unified Diff: components/gcm_driver/gcm_client_impl.cc

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 5 years, 2 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 | « components/gcm_driver/gcm_client_impl.h ('k') | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/gcm_client_impl.cc
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc
index 1a95809f6fb1b7832cd09af1d2ea0f3326498dbb..b0f298f897eea0c755dbd0f8b17828079d0030f3 100644
--- a/components/gcm_driver/gcm_client_impl.cc
+++ b/components/gcm_driver/gcm_client_impl.cc
@@ -255,16 +255,15 @@ scoped_ptr<MCSClient> GCMInternalsBuilder::BuildMCSClient(
scoped_ptr<ConnectionFactory> GCMInternalsBuilder::BuildConnectionFactory(
const std::vector<GURL>& endpoints,
const net::BackoffEntry::Policy& backoff_policy,
- const scoped_refptr<net::HttpNetworkSession>& gcm_network_session,
- const scoped_refptr<net::HttpNetworkSession>& http_network_session,
- net::NetLog* net_log,
+ net::HttpNetworkSession* gcm_network_session,
+ net::HttpNetworkSession* http_network_session,
GCMStatsRecorder* recorder) {
return make_scoped_ptr<ConnectionFactory>(
new ConnectionFactoryImpl(endpoints,
backoff_policy,
gcm_network_session,
http_network_session,
- net_log,
+ nullptr,
recorder));
}
@@ -326,7 +325,7 @@ void GCMClientImpl::Initialize(
url_request_context_getter_->GetURLRequestContext()->
GetNetworkSessionParams();
DCHECK(network_session_params);
- network_session_ = new net::HttpNetworkSession(*network_session_params);
+ network_session_.reset(new net::HttpNetworkSession(*network_session_params));
chrome_build_info_ = chrome_build_info;
@@ -483,11 +482,10 @@ void GCMClientImpl::InitializeMCSClient() {
connection_factory_ = internals_builder_->BuildConnectionFactory(
endpoints,
GetGCMBackoffPolicy(),
- network_session_,
+ network_session_.get(),
url_request_context_getter_->GetURLRequestContext()
->http_transaction_factory()
->GetSession(),
- net_log_.net_log(),
&recorder_);
connection_factory_->SetConnectionListener(this);
mcs_client_ = internals_builder_->BuildMCSClient(
« no previous file with comments | « components/gcm_driver/gcm_client_impl.h ('k') | components/gcm_driver/gcm_client_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698