| OLD | NEW | 
|    1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2012 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 NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |    5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 
|    6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |    6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 
|    7  |    7  | 
|    8 #include "base/memory/ref_counted.h" |    8 #include "base/memory/ref_counted.h" | 
|    9 #include "base/memory/scoped_ptr.h" |    9 #include "base/memory/scoped_ptr.h" | 
|   10 #include "base/message_loop.h" |   10 #include "base/message_loop.h" | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   46   virtual void Disconnect() OVERRIDE; |   46   virtual void Disconnect() OVERRIDE; | 
|   47   virtual bool IsConnected() const OVERRIDE; |   47   virtual bool IsConnected() const OVERRIDE; | 
|   48   virtual bool IsConnectedAndIdle() const OVERRIDE; |   48   virtual bool IsConnectedAndIdle() const OVERRIDE; | 
|   49   virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |   49   virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 
|   50   virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |   50   virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 
|   51   virtual const BoundNetLog& NetLog() const OVERRIDE; |   51   virtual const BoundNetLog& NetLog() const OVERRIDE; | 
|   52   virtual void SetSubresourceSpeculation() OVERRIDE; |   52   virtual void SetSubresourceSpeculation() OVERRIDE; | 
|   53   virtual void SetOmniboxSpeculation() OVERRIDE; |   53   virtual void SetOmniboxSpeculation() OVERRIDE; | 
|   54   virtual bool WasEverUsed() const OVERRIDE; |   54   virtual bool WasEverUsed() const OVERRIDE; | 
|   55   virtual bool UsingTCPFastOpen() const OVERRIDE; |   55   virtual bool UsingTCPFastOpen() const OVERRIDE; | 
|   56   virtual int64 NumBytesRead() const OVERRIDE; |  | 
|   57   virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |  | 
|   58   virtual bool WasNpnNegotiated() const OVERRIDE; |   56   virtual bool WasNpnNegotiated() const OVERRIDE; | 
|   59   virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |   57   virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 
|   60   virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |   58   virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 
|   61  |   59  | 
|   62   // Socket implementation. |   60   // Socket implementation. | 
|   63   // Multiple outstanding requests are not supported. |   61   // Multiple outstanding requests are not supported. | 
|   64   // Full duplex mode (reading and writing at the same time) is supported |   62   // Full duplex mode (reading and writing at the same time) is supported | 
|   65   virtual int Read(IOBuffer* buf, |   63   virtual int Read(IOBuffer* buf, | 
|   66                    int buf_len, |   64                    int buf_len, | 
|   67                    const CompletionCallback& callback) OVERRIDE; |   65                    const CompletionCallback& callback) OVERRIDE; | 
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  189   // Record of connectivity and transmissions, for use in speculative connection |  187   // Record of connectivity and transmissions, for use in speculative connection | 
|  190   // histograms. |  188   // histograms. | 
|  191   UseHistory use_history_; |  189   UseHistory use_history_; | 
|  192  |  190  | 
|  193   // Enables experimental TCP FastOpen option. |  191   // Enables experimental TCP FastOpen option. | 
|  194   const bool use_tcp_fastopen_; |  192   const bool use_tcp_fastopen_; | 
|  195  |  193  | 
|  196   // True when TCP FastOpen is in use and we have done the connect. |  194   // True when TCP FastOpen is in use and we have done the connect. | 
|  197   bool tcp_fastopen_connected_; |  195   bool tcp_fastopen_connected_; | 
|  198  |  196  | 
|  199   base::TimeTicks connect_start_time_; |  | 
|  200   base::TimeDelta connect_time_micros_; |  | 
|  201   int64 num_bytes_read_; |  | 
|  202  |  | 
|  203   DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); |  197   DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); | 
|  204 }; |  198 }; | 
|  205  |  199  | 
|  206 }  // namespace net |  200 }  // namespace net | 
|  207  |  201  | 
|  208 #endif  // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |  202 #endif  // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 
| OLD | NEW |