| Index: sync/engine/net/server_connection_manager.h
|
| diff --git a/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h
|
| index f9c4a544dfe62085c09dd0bdc9b0cb0ba95eb2e8..7496a5338b2fe9b97b12b33fcf6895e93801d230 100644
|
| --- a/sync/engine/net/server_connection_manager.h
|
| +++ b/sync/engine/net/server_connection_manager.h
|
| @@ -16,6 +16,7 @@
|
| #include "base/threading/non_thread_safe.h"
|
| #include "base/threading/thread_checker.h"
|
| #include "sync/base/sync_export.h"
|
| +#include "sync/internal_api/public/base/cancelation_observer.h"
|
| #include "sync/syncable/syncable_id.h"
|
|
|
| namespace sync_pb {
|
| @@ -24,6 +25,8 @@ class ClientToServerMessage;
|
|
|
| namespace syncer {
|
|
|
| +class CancelationSignal;
|
| +
|
| namespace syncable {
|
| class Directory;
|
| }
|
| @@ -125,7 +128,7 @@ class SYNC_EXPORT_PRIVATE ScopedServerStatusWatcher
|
| // Use this class to interact with the sync server.
|
| // The ServerConnectionManager currently supports POSTing protocol buffers.
|
| //
|
| -class SYNC_EXPORT_PRIVATE ServerConnectionManager {
|
| +class SYNC_EXPORT_PRIVATE ServerConnectionManager : public CancelationObserver {
|
| public:
|
| // buffer_in - will be POSTed
|
| // buffer_out - string will be overwritten with response
|
| @@ -183,7 +186,8 @@ class SYNC_EXPORT_PRIVATE ServerConnectionManager {
|
| ServerConnectionManager(const std::string& server,
|
| int port,
|
| bool use_ssl,
|
| - bool use_oauth2_token);
|
| + bool use_oauth2_token,
|
| + CancelationSignal* cancelation_signal);
|
|
|
| virtual ~ServerConnectionManager();
|
|
|
| @@ -219,7 +223,7 @@ class SYNC_EXPORT_PRIVATE ServerConnectionManager {
|
| // We expect this to get called on a different thread than the valid
|
| // ThreadChecker thread, as we want to kill any pending http traffic without
|
| // having to wait for the request to complete.
|
| - virtual void TerminateAllIO();
|
| + virtual void OnSignalReceived() OVERRIDE FINAL;
|
|
|
| void set_client_id(const std::string& client_id) {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -342,6 +346,9 @@ class SYNC_EXPORT_PRIVATE ServerConnectionManager {
|
|
|
| void NotifyStatusChanged();
|
|
|
| + CancelationSignal* const cancelation_signal_;
|
| + bool signal_handler_registered_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager);
|
| };
|
|
|
|
|