| Index: google_apis/gcm/engine/fake_connection_factory.h
|
| diff --git a/google_apis/gcm/engine/fake_connection_factory.h b/google_apis/gcm/engine/fake_connection_factory.h
|
| index bd29310603101726f821f8d77e9e3253c2ef193d..393e591e926d58485bbc4ee2e81468ac7d594b8b 100644
|
| --- a/google_apis/gcm/engine/fake_connection_factory.h
|
| +++ b/google_apis/gcm/engine/fake_connection_factory.h
|
| @@ -28,13 +28,26 @@ class FakeConnectionFactory : public ConnectionFactory {
|
| virtual void Connect() OVERRIDE;
|
| virtual bool IsEndpointReachable() const OVERRIDE;
|
| virtual base::TimeTicks NextRetryAttempt() const OVERRIDE;
|
| - virtual void SignalConnectionReset() OVERRIDE;
|
| + virtual void SignalConnectionReset(ConnectionResetReason reason) 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);
|
| };
|
|
|
|
|