| 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_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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Copies the peer address to |address| and returns a network error code. | 60 // Copies the peer address to |address| and returns a network error code. |
| 61 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. | 61 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not connected. |
| 62 virtual int GetPeerAddress(IPEndPoint* address) const = 0; | 62 virtual int GetPeerAddress(IPEndPoint* address) const = 0; |
| 63 | 63 |
| 64 // Copies the local address to |address| and returns a network error code. | 64 // Copies the local address to |address| and returns a network error code. |
| 65 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not bound. | 65 // ERR_SOCKET_NOT_CONNECTED will be returned if the socket is not bound. |
| 66 virtual int GetLocalAddress(IPEndPoint* address) const = 0; | 66 virtual int GetLocalAddress(IPEndPoint* address) const = 0; |
| 67 | 67 |
| 68 // Gets the NetLog for this socket. | 68 // Gets the NetLog for this socket. |
| 69 virtual const BoundNetLog& NetLog() const = 0; | 69 virtual const NetLogWithSource& NetLog() const = 0; |
| 70 | 70 |
| 71 // Set the annotation to indicate this socket was created for speculative | 71 // Set the annotation to indicate this socket was created for speculative |
| 72 // reasons. This call is generally forwarded to a basic TCPClientSocket*, | 72 // reasons. This call is generally forwarded to a basic TCPClientSocket*, |
| 73 // where a UseHistory can be updated. | 73 // where a UseHistory can be updated. |
| 74 virtual void SetSubresourceSpeculation() = 0; | 74 virtual void SetSubresourceSpeculation() = 0; |
| 75 virtual void SetOmniboxSpeculation() = 0; | 75 virtual void SetOmniboxSpeculation() = 0; |
| 76 | 76 |
| 77 // Returns true if the socket ever had any reads or writes. StreamSockets | 77 // Returns true if the socket ever had any reads or writes. StreamSockets |
| 78 // layered on top of transport sockets should return if their own Read() or | 78 // layered on top of transport sockets should return if their own Read() or |
| 79 // Write() methods had been called, not the underlying transport's. | 79 // Write() methods had been called, not the underlying transport's. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // identify the motivation. | 149 // identify the motivation. |
| 150 bool omnibox_speculation_; | 150 bool omnibox_speculation_; |
| 151 bool subresource_speculation_; | 151 bool subresource_speculation_; |
| 152 DISALLOW_COPY_AND_ASSIGN(UseHistory); | 152 DISALLOW_COPY_AND_ASSIGN(UseHistory); |
| 153 }; | 153 }; |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace net | 156 } // namespace net |
| 157 | 157 |
| 158 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 158 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |