Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_STREAM_SOCKET_H_ | 5 #ifndef NET_SOCKET_STREAM_SOCKET_H_ |
| 6 #define NET_SOCKET_STREAM_SOCKET_H_ | 6 #define NET_SOCKET_STREAM_SOCKET_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 // Returns true if the underlying transport socket is using TCP FastOpen. | 80 // Returns true if the underlying transport socket is using TCP FastOpen. |
| 81 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. | 81 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. |
| 82 virtual bool UsingTCPFastOpen() const = 0; | 82 virtual bool UsingTCPFastOpen() const = 0; |
| 83 | 83 |
| 84 // Returns the number of bytes successfully read from this socket. | 84 // Returns the number of bytes successfully read from this socket. |
| 85 virtual int64 NumBytesRead() const = 0; | 85 virtual int64 NumBytesRead() const = 0; |
| 86 | 86 |
| 87 // Returns the connection setup time of this socket. | 87 // Returns the connection setup time of this socket. |
| 88 virtual base::TimeDelta GetConnectTimeMicros() const = 0; | 88 virtual base::TimeDelta GetConnectTimeMicros() const = 0; |
| 89 | 89 |
| 90 // Returns the protocol negotiated for this socket. | |
|
wtc
2012/03/30 21:19:14
Please mention the use of NPN in this comment.
Pl
Ryan Hamilton
2012/03/30 21:53:17
Done.
| |
| 91 virtual NextProto GetNegotiatedProtocol() const = 0; | |
| 92 | |
| 90 protected: | 93 protected: |
| 91 // The following class is only used to gather statistics about the history of | 94 // The following class is only used to gather statistics about the history of |
| 92 // a socket. It is only instantiated and used in basic sockets, such as | 95 // a socket. It is only instantiated and used in basic sockets, such as |
| 93 // TCPClientSocket* instances. Other classes that are derived from | 96 // TCPClientSocket* instances. Other classes that are derived from |
| 94 // StreamSocket should forward any potential settings to their underlying | 97 // StreamSocket should forward any potential settings to their underlying |
| 95 // transport sockets. | 98 // transport sockets. |
| 96 class UseHistory { | 99 class UseHistory { |
| 97 public: | 100 public: |
| 98 UseHistory(); | 101 UseHistory(); |
| 99 ~UseHistory(); | 102 ~UseHistory(); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 126 // identify the motivation. | 129 // identify the motivation. |
| 127 bool omnibox_speculation_; | 130 bool omnibox_speculation_; |
| 128 bool subresource_speculation_; | 131 bool subresource_speculation_; |
| 129 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 132 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
| 130 }; | 133 }; |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace net | 136 } // namespace net |
| 134 | 137 |
| 135 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 138 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |