Chromium Code Reviews| 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..c7ff6d2180031ec928958eea4594c71aeff0ecde 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 GetCurrentIP(); |
|
fgorski
2014/06/05 00:03:11
Could we change the name to reflect that we mean t
Nicolas Zea
2014/06/05 20:17:27
Done.
|
| + |
| 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); |