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

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

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
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 a07de1266fc7d1ff228aeb7cb67b1552e9e64538..d979208af3dc517c130cf16ee10e2921c908639f 100644
--- a/google_apis/gcm/engine/connection_factory_impl.h
+++ b/google_apis/gcm/engine/connection_factory_impl.h
@@ -36,14 +36,11 @@
// 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,
- 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);
~ConnectionFactoryImpl() override;
@@ -138,10 +135,10 @@
// ---- net:: components for establishing connections. ----
// Network session for creating new GCM connections.
- net::HttpNetworkSession* gcm_network_session_;
+ const scoped_refptr<net::HttpNetworkSession> gcm_network_session_;
// HTTP Network session. If set, is used for extracting proxy auth
- // credentials. If nullptr, is ignored.
- net::HttpNetworkSession* http_network_session_;
+ // credentials. If not set, is ignored.
+ const scoped_refptr<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.
« no previous file with comments | « content/shell/browser/shell_url_request_context_getter.cc ('k') | google_apis/gcm/engine/connection_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698