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

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

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 #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
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 via for this socket, or
Sergey Ulanov 2012/04/02 18:20:22 via NPN?
Ryan Hamilton 2012/04/02 20:57:33 Done.
91 // kProtoUnknown will be returned if NPN is not applicable.
Sergey Ulanov 2012/04/02 18:20:22 I think ideally this shouldn't be part of StreamSo
Ryan Hamilton 2012/04/02 20:57:33 Yeah, I totally hear you. The problem comes up be
92 virtual NextProto GetNegotiatedProtocol() const = 0;
93
90 protected: 94 protected:
91 // The following class is only used to gather statistics about the history of 95 // 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 96 // a socket. It is only instantiated and used in basic sockets, such as
93 // TCPClientSocket* instances. Other classes that are derived from 97 // TCPClientSocket* instances. Other classes that are derived from
94 // StreamSocket should forward any potential settings to their underlying 98 // StreamSocket should forward any potential settings to their underlying
95 // transport sockets. 99 // transport sockets.
96 class UseHistory { 100 class UseHistory {
97 public: 101 public:
98 UseHistory(); 102 UseHistory();
99 ~UseHistory(); 103 ~UseHistory();
(...skipping 26 matching lines...) Expand all
126 // identify the motivation. 130 // identify the motivation.
127 bool omnibox_speculation_; 131 bool omnibox_speculation_;
128 bool subresource_speculation_; 132 bool subresource_speculation_;
129 DISALLOW_COPY_AND_ASSIGN(UseHistory); 133 DISALLOW_COPY_AND_ASSIGN(UseHistory);
130 }; 134 };
131 }; 135 };
132 136
133 } // namespace net 137 } // namespace net
134 138
135 #endif // NET_SOCKET_STREAM_SOCKET_H_ 139 #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