| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
| 6 #define COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <iosfwd> | 10 #include <iosfwd> |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 const std::string& path, | 223 const std::string& path, |
| 224 const std::string& auth_token); | 224 const std::string& auth_token); |
| 225 | 225 |
| 226 // An internal helper to clear our auth_token_ and cache the old version | 226 // An internal helper to clear our auth_token_ and cache the old version |
| 227 // in |previously_invalidated_token_| to shelter us from retrying with a | 227 // in |previously_invalidated_token_| to shelter us from retrying with a |
| 228 // known bad token. | 228 // known bad token. |
| 229 void InvalidateAndClearAuthToken(); | 229 void InvalidateAndClearAuthToken(); |
| 230 | 230 |
| 231 // Helper to check terminated flags and build a Connection object, installing | 231 // Helper to check terminated flags and build a Connection object, installing |
| 232 // it as the |active_connection_|. If this ServerConnectionManager has been | 232 // it as the |active_connection_|. If this ServerConnectionManager has been |
| 233 // terminated, this will return NULL. | 233 // terminated, this will return null. |
| 234 Connection* MakeActiveConnection(); | 234 Connection* MakeActiveConnection(); |
| 235 | 235 |
| 236 // Called by Connection objects as they are destroyed to allow the | 236 // Called by Connection objects as they are destroyed to allow the |
| 237 // ServerConnectionManager to cleanup active connections. | 237 // ServerConnectionManager to cleanup active connections. |
| 238 void OnConnectionDestroyed(Connection* connection); | 238 void OnConnectionDestroyed(Connection* connection); |
| 239 | 239 |
| 240 // The sync_server_ is the server that requests will be made to. | 240 // The sync_server_ is the server that requests will be made to. |
| 241 std::string sync_server_; | 241 std::string sync_server_; |
| 242 | 242 |
| 243 // The sync_server_port_ is the port that HTTP requests will be made on. | 243 // The sync_server_port_ is the port that HTTP requests will be made on. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 bool signal_handler_registered_; | 300 bool signal_handler_registered_; |
| 301 | 301 |
| 302 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); | 302 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); |
| 303 }; | 303 }; |
| 304 | 304 |
| 305 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); | 305 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); |
| 306 | 306 |
| 307 } // namespace syncer | 307 } // namespace syncer |
| 308 | 308 |
| 309 #endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 309 #endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
| OLD | NEW |