| 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 SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 5 #ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| 6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 std::string GetServerHost() const; | 210 std::string GetServerHost() const; |
| 211 | 211 |
| 212 // Factory method to create an Connection object we can use for | 212 // Factory method to create an Connection object we can use for |
| 213 // communication with the server. | 213 // communication with the server. |
| 214 virtual Connection* MakeConnection(); | 214 virtual Connection* MakeConnection(); |
| 215 | 215 |
| 216 // Closes any active network connections to the sync server. | 216 // Closes any active network connections to the sync server. |
| 217 // We expect this to get called on a different thread than the valid | 217 // We expect this to get called on a different thread than the valid |
| 218 // ThreadChecker thread, as we want to kill any pending http traffic without | 218 // ThreadChecker thread, as we want to kill any pending http traffic without |
| 219 // having to wait for the request to complete. | 219 // having to wait for the request to complete. |
| 220 virtual void OnSignalReceived() OVERRIDE FINAL; | 220 virtual void OnSignalReceived() override final; |
| 221 | 221 |
| 222 void set_client_id(const std::string& client_id) { | 222 void set_client_id(const std::string& client_id) { |
| 223 DCHECK(thread_checker_.CalledOnValidThread()); | 223 DCHECK(thread_checker_.CalledOnValidThread()); |
| 224 DCHECK(client_id_.empty()); | 224 DCHECK(client_id_.empty()); |
| 225 client_id_.assign(client_id); | 225 client_id_.assign(client_id); |
| 226 } | 226 } |
| 227 | 227 |
| 228 // Sets a new auth token and time. | 228 // Sets a new auth token and time. |
| 229 bool SetAuthToken(const std::string& auth_token); | 229 bool SetAuthToken(const std::string& auth_token); |
| 230 | 230 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 bool signal_handler_registered_; | 332 bool signal_handler_registered_; |
| 333 | 333 |
| 334 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); | 334 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); | 337 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); |
| 338 | 338 |
| 339 } // namespace syncer | 339 } // namespace syncer |
| 340 | 340 |
| 341 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 341 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| OLD | NEW |