Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: net/socket/stream_socket.h

Issue 169643006: Use sockets with unread data if they've never been used before. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mmenke comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "net/base/net_log.h" 8 #include "net/base/net_log.h"
9 #include "net/socket/next_proto.h" 9 #include "net/socket/next_proto.h"
10 #include "net/socket/socket.h" 10 #include "net/socket/socket.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Gets the NetLog for this socket. 64 // Gets the NetLog for this socket.
65 virtual const BoundNetLog& NetLog() const = 0; 65 virtual const BoundNetLog& NetLog() const = 0;
66 66
67 // Set the annotation to indicate this socket was created for speculative 67 // Set the annotation to indicate this socket was created for speculative
68 // reasons. This call is generally forwarded to a basic TCPClientSocket*, 68 // reasons. This call is generally forwarded to a basic TCPClientSocket*,
69 // where a UseHistory can be updated. 69 // where a UseHistory can be updated.
70 virtual void SetSubresourceSpeculation() = 0; 70 virtual void SetSubresourceSpeculation() = 0;
71 virtual void SetOmniboxSpeculation() = 0; 71 virtual void SetOmniboxSpeculation() = 0;
72 72
73 // Returns true if the underlying transport socket ever had any reads or 73 // Returns true if the socket ever had any reads or writes. StreamSockets
74 // writes. StreamSockets layered on top of transport sockets should forward 74 // layered on top of transport sockets should return if their own Read() or
75 // this call to the transport socket. 75 // Write() methods had been called, not the underlying transport's.
76 virtual bool WasEverUsed() const = 0; 76 virtual bool WasEverUsed() const = 0;
77 77
78 // Returns true if the underlying transport socket is using TCP FastOpen. 78 // Returns true if the underlying transport socket is using TCP FastOpen.
79 // TCP FastOpen is an experiment with sending data in the TCP SYN packet. 79 // TCP FastOpen is an experiment with sending data in the TCP SYN packet.
80 virtual bool UsingTCPFastOpen() const = 0; 80 virtual bool UsingTCPFastOpen() const = 0;
81 81
82 // Returns true if NPN was negotiated during the connection of this socket. 82 // Returns true if NPN was negotiated during the connection of this socket.
83 virtual bool WasNpnNegotiated() const = 0; 83 virtual bool WasNpnNegotiated() const = 0;
84 84
85 // Returns the protocol negotiated via NPN for this socket, or 85 // Returns the protocol negotiated via NPN for this socket, or
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // identify the motivation. 129 // identify the motivation.
130 bool omnibox_speculation_; 130 bool omnibox_speculation_;
131 bool subresource_speculation_; 131 bool subresource_speculation_;
132 DISALLOW_COPY_AND_ASSIGN(UseHistory); 132 DISALLOW_COPY_AND_ASSIGN(UseHistory);
133 }; 133 };
134 }; 134 };
135 135
136 } // namespace net 136 } // namespace net
137 137
138 #endif // NET_SOCKET_STREAM_SOCKET_H_ 138 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698