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

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

Issue 2414883005: TEMP DO NOT LAND (Closed)
Patch Set: tmp Created 4 years, 1 month 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.cc ('k') | net/socket/stream_socket.cc » ('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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/socket/connection_attempts.h" 12 #include "net/socket/connection_attempts.h"
13 #include "net/socket/next_proto.h" 13 #include "net/socket/next_proto.h"
14 #include "net/socket/socket.h" 14 #include "net/socket/socket.h"
15 15
16 namespace base {
17 namespace trace_event {
18 class MemoryAllocatorDump;
19 }
20 }
21
16 namespace net { 22 namespace net {
17 23
18 class AddressList; 24 class AddressList;
19 class IPEndPoint; 25 class IPEndPoint;
20 class NetLogWithSource; 26 class NetLogWithSource;
21 class SSLInfo; 27 class SSLInfo;
22 28
23 class NET_EXPORT_PRIVATE StreamSocket : public Socket { 29 class NET_EXPORT_PRIVATE StreamSocket : public Socket {
24 public: 30 public:
25 ~StreamSocket() override {} 31 ~StreamSocket() override {}
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 110
105 // Adds |attempts| to the socket's list of connection attempts. 111 // Adds |attempts| to the socket's list of connection attempts.
106 virtual void AddConnectionAttempts(const ConnectionAttempts& attempts) = 0; 112 virtual void AddConnectionAttempts(const ConnectionAttempts& attempts) = 0;
107 113
108 // Returns the total number of number bytes read by the socket. This only 114 // Returns the total number of number bytes read by the socket. This only
109 // counts the payload bytes. Transport headers are not counted. Returns 115 // counts the payload bytes. Transport headers are not counted. Returns
110 // 0 if the socket does not implement the function. The count is reset when 116 // 0 if the socket does not implement the function. The count is reset when
111 // Disconnect() is called. 117 // Disconnect() is called.
112 virtual int64_t GetTotalReceivedBytes() const = 0; 118 virtual int64_t GetTotalReceivedBytes() const = 0;
113 119
120 virtual void PopulateAllocatorDump(
121 base::trace_event::MemoryAllocatorDump* dump) const;
122
114 protected: 123 protected:
115 // The following class is only used to gather statistics about the history of 124 // The following class is only used to gather statistics about the history of
116 // a socket. It is only instantiated and used in basic sockets, such as 125 // a socket. It is only instantiated and used in basic sockets, such as
117 // TCPClientSocket* instances. Other classes that are derived from 126 // TCPClientSocket* instances. Other classes that are derived from
118 // StreamSocket should forward any potential settings to their underlying 127 // StreamSocket should forward any potential settings to their underlying
119 // transport sockets. 128 // transport sockets.
120 class UseHistory { 129 class UseHistory {
121 public: 130 public:
122 UseHistory(); 131 UseHistory();
123 ~UseHistory(); 132 ~UseHistory();
(...skipping 26 matching lines...) Expand all
150 // identify the motivation. 159 // identify the motivation.
151 bool omnibox_speculation_; 160 bool omnibox_speculation_;
152 bool subresource_speculation_; 161 bool subresource_speculation_;
153 DISALLOW_COPY_AND_ASSIGN(UseHistory); 162 DISALLOW_COPY_AND_ASSIGN(UseHistory);
154 }; 163 };
155 }; 164 };
156 165
157 } // namespace net 166 } // namespace net
158 167
159 #endif // NET_SOCKET_STREAM_SOCKET_H_ 168 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool.cc ('k') | net/socket/stream_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698