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

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

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing linker error for Windows. Created 6 years, 3 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
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket/tcp_client_socket.h » ('j') | 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 socket ever had any reads or writes. StreamSockets 73 // Returns true if the socket ever had any reads or writes. StreamSockets
74 // layered on top of transport sockets should return if their own Read() or 74 // layered on top of transport sockets should return if their own Read() or
75 // Write() methods had been called, not the underlying transport's. 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 // TODO(jri): Clean up -- remove this method.
78 // Returns true if the underlying transport socket is using TCP FastOpen. 79 // 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. 80 // TCP FastOpen is an experiment with sending data in the TCP SYN packet.
80 virtual bool UsingTCPFastOpen() const = 0; 81 virtual bool UsingTCPFastOpen() const = 0;
81 82
83 // TODO(jri): Clean up -- rename to a more general EnableAutoConnectOnWrite.
84 // Enables use of TCP FastOpen for the underlying transport socket.
85 virtual void EnableTCPFastOpenIfSupported() {}
86
82 // Returns true if NPN was negotiated during the connection of this socket. 87 // Returns true if NPN was negotiated during the connection of this socket.
83 virtual bool WasNpnNegotiated() const = 0; 88 virtual bool WasNpnNegotiated() const = 0;
84 89
85 // Returns the protocol negotiated via NPN for this socket, or 90 // Returns the protocol negotiated via NPN for this socket, or
86 // kProtoUnknown will be returned if NPN is not applicable. 91 // kProtoUnknown will be returned if NPN is not applicable.
87 virtual NextProto GetNegotiatedProtocol() const = 0; 92 virtual NextProto GetNegotiatedProtocol() const = 0;
88 93
89 // Gets the SSL connection information of the socket. Returns false if 94 // Gets the SSL connection information of the socket. Returns false if
90 // SSL was not used by this socket. 95 // SSL was not used by this socket.
91 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0; 96 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // identify the motivation. 134 // identify the motivation.
130 bool omnibox_speculation_; 135 bool omnibox_speculation_;
131 bool subresource_speculation_; 136 bool subresource_speculation_;
132 DISALLOW_COPY_AND_ASSIGN(UseHistory); 137 DISALLOW_COPY_AND_ASSIGN(UseHistory);
133 }; 138 };
134 }; 139 };
135 140
136 } // namespace net 141 } // namespace net
137 142
138 #endif // NET_SOCKET_STREAM_SOCKET_H_ 143 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket/tcp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698