| Index: google_apis/gcm/engine/connection_factory_impl.cc
|
| diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc
|
| index 19f456c39869b5930b3d1613afb5a43c4b2e7cf3..4c4f279bb1ae4e5566524e0dffb69736cf094508 100644
|
| --- a/google_apis/gcm/engine/connection_factory_impl.cc
|
| +++ b/google_apis/gcm/engine/connection_factory_impl.cc
|
| @@ -16,7 +16,6 @@
|
| #include "net/base/net_errors.h"
|
| #include "net/http/http_network_session.h"
|
| #include "net/http/http_request_headers.h"
|
| -#include "net/log/net_log.h"
|
| #include "net/proxy/proxy_info.h"
|
| #include "net/socket/client_socket_handle.h"
|
| #include "net/socket/client_socket_pool_manager.h"
|
| @@ -48,8 +47,8 @@
|
| ConnectionFactoryImpl::ConnectionFactoryImpl(
|
| const std::vector<GURL>& mcs_endpoints,
|
| const net::BackoffEntry::Policy& backoff_policy,
|
| - net::HttpNetworkSession* gcm_network_session,
|
| - net::HttpNetworkSession* http_network_session,
|
| + const scoped_refptr<net::HttpNetworkSession>& gcm_network_session,
|
| + const scoped_refptr<net::HttpNetworkSession>& http_network_session,
|
| net::NetLog* net_log,
|
| GCMStatsRecorder* recorder)
|
| : mcs_endpoints_(mcs_endpoints),
|
| @@ -69,8 +68,8 @@
|
| listener_(NULL),
|
| weak_ptr_factory_(this) {
|
| DCHECK_GE(mcs_endpoints_.size(), 1U);
|
| - DCHECK(!http_network_session_ ||
|
| - (gcm_network_session_ != http_network_session_));
|
| + DCHECK(!http_network_session_.get() ||
|
| + (gcm_network_session_.get() != http_network_session_.get()));
|
| }
|
|
|
| ConnectionFactoryImpl::~ConnectionFactoryImpl() {
|
| @@ -458,7 +457,7 @@
|
| gcm_network_session_->ssl_config_service()->GetSSLConfig(&ssl_config);
|
| status = net::InitSocketHandleForTlsConnect(
|
| net::HostPortPair::FromURL(GetCurrentEndpoint()),
|
| - gcm_network_session_,
|
| + gcm_network_session_.get(),
|
| proxy_info_,
|
| ssl_config,
|
| ssl_config,
|
| @@ -559,7 +558,7 @@
|
| }
|
|
|
| void ConnectionFactoryImpl::ReportSuccessfulProxyConnection() {
|
| - if (gcm_network_session_ && gcm_network_session_->proxy_service())
|
| + if (gcm_network_session_.get() && gcm_network_session_->proxy_service())
|
| gcm_network_session_->proxy_service()->ReportSuccess(proxy_info_, NULL);
|
| }
|
|
|
| @@ -575,7 +574,7 @@
|
| }
|
|
|
| void ConnectionFactoryImpl::RebuildNetworkSessionAuthCache() {
|
| - if (!http_network_session_ || !http_network_session_->http_auth_cache())
|
| + if (!http_network_session_.get() || !http_network_session_->http_auth_cache())
|
| return;
|
|
|
| gcm_network_session_->http_auth_cache()->UpdateAllFrom(
|
|
|