| 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 80fbc94ea8c073ceb6caa0408e0bbb8c84f9d6ba..be0f2bd8bd558537f87c199d47fe3cbf7d60439e 100644
|
| --- a/google_apis/gcm/engine/connection_factory_impl.h
|
| +++ b/google_apis/gcm/engine/connection_factory_impl.h
|
| @@ -31,10 +31,15 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| public ConnectionFactory,
|
| public net::NetworkChangeNotifier::NetworkChangeObserver {
|
| public:
|
| + // |http_network_session| is an optional network session to use as a source
|
| + // 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|.
|
| ConnectionFactoryImpl(
|
| const std::vector<GURL>& mcs_endpoints,
|
| const net::BackoffEntry::Policy& backoff_policy,
|
| - scoped_refptr<net::HttpNetworkSession> network_session,
|
| + const scoped_refptr<net::HttpNetworkSession>& http_network_session,
|
| + const scoped_refptr<net::HttpNetworkSession>& gcm_network_session,
|
| net::NetLog* net_log,
|
| GCMStatsRecorder* recorder);
|
| virtual ~ConnectionFactoryImpl();
|
| @@ -110,8 +115,13 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| int ReconsiderProxyAfterError(int error);
|
| void ReportSuccessfulProxyConnection();
|
|
|
| + // Closes the local socket if one is present, and resets connection handler.
|
| void CloseSocket();
|
|
|
| + // Updates the GCM Network Session's HttpAuthCache with the HTTP Network
|
| + // Session's cache, if available.
|
| + void RebuildNetworkSessionAuthCache();
|
| +
|
| // The MCS endpoints to make connections to, sorted in order of priority.
|
| const std::vector<GURL> mcs_endpoints_;
|
| // Index to the endpoint for which a connection should be attempted next.
|
| @@ -123,8 +133,11 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| const net::BackoffEntry::Policy backoff_policy_;
|
|
|
| // ---- net:: components for establishing connections. ----
|
| - // Network session for creating new connections.
|
| - const scoped_refptr<net::HttpNetworkSession> network_session_;
|
| + // Network session for creating new GCM connections.
|
| + const scoped_refptr<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_;
|
| // Net log to use in connection attempts.
|
| net::BoundNetLog bound_net_log_;
|
| // The current PAC request, if one exists. Owned by the proxy service.
|
|
|