| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
| 6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
| 7 | 7 |
| 8 #include "google_apis/gcm/engine/connection_factory.h" | 8 #include "google_apis/gcm/engine/connection_factory.h" |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const scoped_refptr<net::HttpNetworkSession>& gcm_network_session, | 41 const scoped_refptr<net::HttpNetworkSession>& gcm_network_session, |
| 42 const scoped_refptr<net::HttpNetworkSession>& http_network_session, | 42 const scoped_refptr<net::HttpNetworkSession>& http_network_session, |
| 43 net::NetLog* net_log, | 43 net::NetLog* net_log, |
| 44 GCMStatsRecorder* recorder); | 44 GCMStatsRecorder* recorder); |
| 45 virtual ~ConnectionFactoryImpl(); | 45 virtual ~ConnectionFactoryImpl(); |
| 46 | 46 |
| 47 // ConnectionFactory implementation. | 47 // ConnectionFactory implementation. |
| 48 virtual void Initialize( | 48 virtual void Initialize( |
| 49 const BuildLoginRequestCallback& request_builder, | 49 const BuildLoginRequestCallback& request_builder, |
| 50 const ConnectionHandler::ProtoReceivedCallback& read_callback, | 50 const ConnectionHandler::ProtoReceivedCallback& read_callback, |
| 51 const ConnectionHandler::ProtoSentCallback& write_callback) OVERRIDE; | 51 const ConnectionHandler::ProtoSentCallback& write_callback) override; |
| 52 virtual ConnectionHandler* GetConnectionHandler() const OVERRIDE; | 52 virtual ConnectionHandler* GetConnectionHandler() const override; |
| 53 virtual void Connect() OVERRIDE; | 53 virtual void Connect() override; |
| 54 virtual bool IsEndpointReachable() const OVERRIDE; | 54 virtual bool IsEndpointReachable() const override; |
| 55 virtual std::string GetConnectionStateString() const OVERRIDE; | 55 virtual std::string GetConnectionStateString() const override; |
| 56 virtual base::TimeTicks NextRetryAttempt() const OVERRIDE; | 56 virtual base::TimeTicks NextRetryAttempt() const override; |
| 57 virtual void SignalConnectionReset(ConnectionResetReason reason) OVERRIDE; | 57 virtual void SignalConnectionReset(ConnectionResetReason reason) override; |
| 58 virtual void SetConnectionListener(ConnectionListener* listener) OVERRIDE; | 58 virtual void SetConnectionListener(ConnectionListener* listener) override; |
| 59 | 59 |
| 60 // NetworkChangeObserver implementation. | 60 // NetworkChangeObserver implementation. |
| 61 virtual void OnNetworkChanged( | 61 virtual void OnNetworkChanged( |
| 62 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 62 net::NetworkChangeNotifier::ConnectionType type) override; |
| 63 | 63 |
| 64 // Returns the server to which the factory is currently connected, or if | 64 // Returns the server to which the factory is currently connected, or if |
| 65 // a connection is currently pending, the server to which the next connection | 65 // a connection is currently pending, the server to which the next connection |
| 66 // attempt will be made. | 66 // attempt will be made. |
| 67 GURL GetCurrentEndpoint() const; | 67 GURL GetCurrentEndpoint() const; |
| 68 | 68 |
| 69 // Returns the IPEndpoint to which the factory is currently connected. If no | 69 // Returns the IPEndpoint to which the factory is currently connected. If no |
| 70 // connection is active, returns an empty IPEndpoint. | 70 // connection is active, returns an empty IPEndpoint. |
| 71 net::IPEndPoint GetPeerIP(); | 71 net::IPEndPoint GetPeerIP(); |
| 72 | 72 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ConnectionListener* listener_; | 187 ConnectionListener* listener_; |
| 188 | 188 |
| 189 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; | 189 base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; |
| 190 | 190 |
| 191 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); | 191 DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 } // namespace gcm | 194 } // namespace gcm |
| 195 | 195 |
| 196 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ | 196 #endif // GOOGLE_APIS_GCM_ENGINE_CONNECTION_FACTORY_IMPL_H_ |
| OLD | NEW |