OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
7 | 7 |
8 #include "google_apis/gcm/engine/connection_factory.h" | 8 #include "google_apis/gcm/engine/connection_factory.h" |
9 | 9 |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Proxy resolution and connection functions. | 126 // Proxy resolution and connection functions. |
127 void OnProxyResolveDone(int status); | 127 void OnProxyResolveDone(int status); |
128 void OnProxyConnectDone(int status); | 128 void OnProxyConnectDone(int status); |
129 int ReconsiderProxyAfterError(int error); | 129 int ReconsiderProxyAfterError(int error); |
130 void ReportSuccessfulProxyConnection(); | 130 void ReportSuccessfulProxyConnection(); |
131 | 131 |
132 // Closes the local socket if one is present, and resets connection handler. | 132 // Closes the local socket if one is present, and resets connection handler. |
133 void CloseSocket(); | 133 void CloseSocket(); |
134 | 134 |
135 // Updates the GCM Network Session's HttpAuthCache with the HTTP Network | 135 // Updates the GCM Network Session's with current data from HTTP Network |
136 // Session's cache, if available. | 136 // Session's, if available. |
137 void RebuildNetworkSessionAuthCache(); | 137 // Specifically, HttpAuthCache and IsQuicEnabled are updated. |
| 138 void UpdateFromHttpNetworkSession(); |
138 | 139 |
139 // The tracker will maintain a list of all connection attempts with GCM, | 140 // The tracker will maintain a list of all connection attempts with GCM, |
140 // whether they succeeded, and their duration. | 141 // whether they succeeded, and their duration. |
141 ConnectionEventTracker event_tracker_; | 142 ConnectionEventTracker event_tracker_; |
142 | 143 |
143 // The MCS endpoints to make connections to, sorted in order of priority. | 144 // The MCS endpoints to make connections to, sorted in order of priority. |
144 const std::vector<GURL> mcs_endpoints_; | 145 const std::vector<GURL> mcs_endpoints_; |
145 // Index to the endpoint for which a connection should be attempted next. | 146 // Index to the endpoint for which a connection should be attempted next. |
146 size_t next_endpoint_; | 147 size_t next_endpoint_; |
147 // Index to the endpoint that was last successfully connected. | 148 // Index to the endpoint that was last successfully connected. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ConnectionListener* listener_; | 211 ConnectionListener* listener_; |
211 | 212 |
212 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; | 213 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; |
213 | 214 |
214 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); | 215 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); |
215 }; | 216 }; |
216 | 217 |
217 } // namespace gcm | 218 } // namespace gcm |
218 | 219 |
219 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 220 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
OLD | NEW |