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

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

Issue 10690122: Change SpdySession::GetSSLInfo to get the SSLInfo from the underlying socket (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FIx curvercp Created 8 years, 5 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_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.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 "base/time.h" 8 #include "base/time.h"
9 #include "net/base/net_log.h" 9 #include "net/base/net_log.h"
10 #include "net/socket/next_proto.h" 10 #include "net/socket/next_proto.h"
11 #include "net/socket/socket.h" 11 #include "net/socket/socket.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 class AddressList; 15 class AddressList;
16 class IPEndPoint; 16 class IPEndPoint;
17 class SSLInfo;
17 18
18 class NET_EXPORT_PRIVATE StreamSocket : public Socket { 19 class NET_EXPORT_PRIVATE StreamSocket : public Socket {
19 public: 20 public:
20 virtual ~StreamSocket() {} 21 virtual ~StreamSocket() {}
21 22
22 // Called to establish a connection. Returns OK if the connection could be 23 // Called to establish a connection. Returns OK if the connection could be
23 // established synchronously. Otherwise, ERR_IO_PENDING is returned and the 24 // established synchronously. Otherwise, ERR_IO_PENDING is returned and the
24 // given callback will run asynchronously when the connection is established 25 // given callback will run asynchronously when the connection is established
25 // or when an error occurs. The result is some other error code if the 26 // or when an error occurs. The result is some other error code if the
26 // connection could not be established. 27 // connection could not be established.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 // Returns true if the underlying transport socket is using TCP FastOpen. 80 // Returns true if the underlying transport socket is using TCP FastOpen.
80 // 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.
81 virtual bool UsingTCPFastOpen() const = 0; 82 virtual bool UsingTCPFastOpen() const = 0;
82 83
83 // Returns the number of bytes successfully read from this socket. 84 // Returns the number of bytes successfully read from this socket.
84 virtual int64 NumBytesRead() const = 0; 85 virtual int64 NumBytesRead() const = 0;
85 86
86 // Returns the connection setup time of this socket. 87 // Returns the connection setup time of this socket.
87 virtual base::TimeDelta GetConnectTimeMicros() const = 0; 88 virtual base::TimeDelta GetConnectTimeMicros() const = 0;
88 89
90 // Returns true if NPN was negotiated during the connection of this socket.
91 virtual bool WasNpnNegotiated() const = 0;
92
89 // Returns the protocol negotiated via NPN for this socket, or 93 // Returns the protocol negotiated via NPN for this socket, or
90 // kProtoUnknown will be returned if NPN is not applicable. 94 // kProtoUnknown will be returned if NPN is not applicable.
91 virtual NextProto GetNegotiatedProtocol() const = 0; 95 virtual NextProto GetNegotiatedProtocol() const = 0;
92 96
97 // Gets the SSL connection information of the socket. Returns false if
98 // SSL was not used by this socket.
99 virtual bool GetSSLInfo(SSLInfo* ssl_info) = 0;
100
93 protected: 101 protected:
94 // The following class is only used to gather statistics about the history of 102 // The following class is only used to gather statistics about the history of
95 // a socket. It is only instantiated and used in basic sockets, such as 103 // a socket. It is only instantiated and used in basic sockets, such as
96 // TCPClientSocket* instances. Other classes that are derived from 104 // TCPClientSocket* instances. Other classes that are derived from
97 // StreamSocket should forward any potential settings to their underlying 105 // StreamSocket should forward any potential settings to their underlying
98 // transport sockets. 106 // transport sockets.
99 class UseHistory { 107 class UseHistory {
100 public: 108 public:
101 UseHistory(); 109 UseHistory();
102 ~UseHistory(); 110 ~UseHistory();
(...skipping 26 matching lines...) Expand all
129 // identify the motivation. 137 // identify the motivation.
130 bool omnibox_speculation_; 138 bool omnibox_speculation_;
131 bool subresource_speculation_; 139 bool subresource_speculation_;
132 DISALLOW_COPY_AND_ASSIGN(UseHistory); 140 DISALLOW_COPY_AND_ASSIGN(UseHistory);
133 }; 141 };
134 }; 142 };
135 143
136 } // namespace net 144 } // namespace net
137 145
138 #endif // NET_SOCKET_STREAM_SOCKET_H_ 146 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_unittest.cc ('k') | net/socket/tcp_client_socket_libevent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698