diff options
Diffstat (limited to 'chromium/google_apis/gcm/engine/fake_connection_factory.h')
-rw-r--r-- | chromium/google_apis/gcm/engine/fake_connection_factory.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/google_apis/gcm/engine/fake_connection_factory.h b/chromium/google_apis/gcm/engine/fake_connection_factory.h index 60b10e130db..b4f0e884d5d 100644 --- a/chromium/google_apis/gcm/engine/fake_connection_factory.h +++ b/chromium/google_apis/gcm/engine/fake_connection_factory.h @@ -27,13 +27,29 @@ class FakeConnectionFactory : public ConnectionFactory { virtual ConnectionHandler* GetConnectionHandler() const OVERRIDE; virtual void Connect() OVERRIDE; virtual bool IsEndpointReachable() const OVERRIDE; + virtual std::string GetConnectionStateString() const OVERRIDE; virtual base::TimeTicks NextRetryAttempt() const OVERRIDE; + virtual void SignalConnectionReset(ConnectionResetReason reason) OVERRIDE; + virtual void SetConnectionListener(ConnectionListener* listener) OVERRIDE; + + // Whether a connection reset has been triggered and is yet to run. + bool reconnect_pending() const { return reconnect_pending_; } + + // Whether connection resets should be handled immediately or delayed until + // release. + void set_delay_reconnect(bool should_delay) { + delay_reconnect_ = should_delay; + } private: scoped_ptr<FakeConnectionHandler> connection_handler_; BuildLoginRequestCallback request_builder_; + // Logic for handling connection resets. + bool reconnect_pending_; + bool delay_reconnect_; + DISALLOW_COPY_AND_ASSIGN(FakeConnectionFactory); }; |