summaryrefslogtreecommitdiffstats
path: root/google_apis/gcm/engine/connection_factory_impl.h
diff options
context:
space:
mode:
authormmenke <mmenke@chromium.org>2015-10-13 10:16:42 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-13 17:17:29 +0000
commite65e7af826f0a081c6e9704381e9604afe26ca09 (patch)
tree8dd89f82fb3e174f293ec43c22ad8a908196b034 /google_apis/gcm/engine/connection_factory_impl.h
parent5187806982cdaf12248d947a3f12c544a1ae79b3 (diff)
downloadchromium_src-e65e7af826f0a081c6e9704381e9604afe26ca09.zip
chromium_src-e65e7af826f0a081c6e9704381e9604afe26ca09.tar.gz
chromium_src-e65e7af826f0a081c6e9704381e9604afe26ca09.tar.bz2
Reland remove reference counting from HttpNetworkSession.
This was originally landed in https://crrev.com/468be2ff331c13b1a081d10a3c17e5366d26e577 and reverted in https://crrev.com/6b3af6e07d19ebb3f86df612ee5a08c8dc8f78ab, due to a new leak in a test causing bots to crash in a fun and exciting manner. BUG=515947 TBR=sgurun@chromium.org,davidben@chromium.org,droger@chromium.org,zea@chromium.org Review URL: https://codereview.chromium.org/1389743003 Cr-Commit-Position: refs/heads/master@{#353774}
Diffstat (limited to 'google_apis/gcm/engine/connection_factory_impl.h')
-rw-r--r--google_apis/gcm/engine/connection_factory_impl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/google_apis/gcm/engine/connection_factory_impl.h b/google_apis/gcm/engine/connection_factory_impl.h
index d979208..a07de12 100644
--- a/google_apis/gcm/engine/connection_factory_impl.h
+++ b/google_apis/gcm/engine/connection_factory_impl.h
@@ -36,11 +36,14 @@ class GCM_EXPORT ConnectionFactoryImpl :
// for proxy auth credentials (via its HttpAuthCache). |gcm_network_session|
// is the network session through which GCM connections should be made, and
// must not be the same as |http_network_session|.
+ //
+ // The caller is responsible for making sure the ConnectionFactoryImpl is
+ // destroyed before the |gcm_network_session| and |http_network_session|.
ConnectionFactoryImpl(
const std::vector<GURL>& mcs_endpoints,
const net::BackoffEntry::Policy& backoff_policy,
- const scoped_refptr<net::HttpNetworkSession>& gcm_network_session,
- const scoped_refptr<net::HttpNetworkSession>& http_network_session,
+ net::HttpNetworkSession* gcm_network_session,
+ net::HttpNetworkSession* http_network_session,
net::NetLog* net_log,
GCMStatsRecorder* recorder);
~ConnectionFactoryImpl() override;
@@ -135,10 +138,10 @@ class GCM_EXPORT ConnectionFactoryImpl :
// ---- net:: components for establishing connections. ----
// Network session for creating new GCM connections.
- const scoped_refptr<net::HttpNetworkSession> gcm_network_session_;
+ net::HttpNetworkSession* gcm_network_session_;
// HTTP Network session. If set, is used for extracting proxy auth
- // credentials. If not set, is ignored.
- const scoped_refptr<net::HttpNetworkSession> http_network_session_;
+ // credentials. If nullptr, is ignored.
+ net::HttpNetworkSession* http_network_session_;
// Net log to use in connection attempts.
net::BoundNetLog bound_net_log_;
// The current PAC request, if one exists. Owned by the proxy service.