| Index: google_apis/gcm/engine/connection_factory_impl.h
|
| diff --git a/google_apis/gcm/engine/connection_factory_impl.h b/google_apis/gcm/engine/connection_factory_impl.h
|
| index b52ef2dc8688ec765993032774d47c920c95e987..31cecf688414bca0514d6a7c6bc3a22bcef79278 100644
|
| --- a/google_apis/gcm/engine/connection_factory_impl.h
|
| +++ b/google_apis/gcm/engine/connection_factory_impl.h
|
| @@ -48,8 +48,10 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| 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;
|
|
|
| // NetworkChangeNotifier observer implementations.
|
| virtual void OnConnectionTypeChanged(
|
| @@ -61,6 +63,10 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| // attempt will be made.
|
| GURL GetCurrentEndpoint() const;
|
|
|
| + // Returns the IPEndpoint to which the factory is currently connected. If no
|
| + // connection is active, returns an empty IPEndpoint.
|
| + net::IPEndPoint GetPeerIP();
|
| +
|
| protected:
|
| // Implementation of Connect(..). If not in backoff, uses |login_request_|
|
| // in attempting a connection/handshake. On connection/handshake failure, goes
|
| @@ -161,6 +167,9 @@ class GCM_EXPORT ConnectionFactoryImpl :
|
| // Recorder that records GCM activities for debugging purpose. Not owned.
|
| GCMStatsRecorder* recorder_;
|
|
|
| + // Listener for connection change events.
|
| + ConnectionListener* listener_;
|
| +
|
| base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl);
|
|
|