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

Unified Diff: google_apis/gcm/engine/connection_factory_impl.h

Issue 1298253002: Remove reference counting from HttpNetworkSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed too much, back up a bit Created 5 years, 4 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
Index: google_apis/gcm/engine/connection_factory_impl.h
diff --git a/google_apis/gcm/engine/connection_factory_impl.h b/google_apis/gcm/engine/connection_factory_impl.h
index d979208af3dc517c130cf16ee10e2921c908639f..a07de1266fc7d1ff228aeb7cb67b1552e9e64538 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.

Powered by Google App Engine
This is Rietveld 408576698