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

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

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: Fix net::SourceStream Created 4 years 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
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 // Called by the socket pool to dump memory allocation stats. |dump| is the
121 // MemoryAllocatorDump of the socket pool.
122 virtual void DumpMemoryStats(
123 base::trace_event::MemoryAllocatorDump* dump) const = 0;
124
114 protected: 125 protected:
115 // The following class is only used to gather statistics about the history of 126 // 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 127 // a socket. It is only instantiated and used in basic sockets, such as
117 // TCPClientSocket* instances. Other classes that are derived from 128 // TCPClientSocket* instances. Other classes that are derived from
118 // StreamSocket should forward any potential settings to their underlying 129 // StreamSocket should forward any potential settings to their underlying
119 // transport sockets. 130 // transport sockets.
120 class UseHistory { 131 class UseHistory {
121 public: 132 public:
122 UseHistory(); 133 UseHistory();
123 ~UseHistory(); 134 ~UseHistory();
(...skipping 26 matching lines...) Expand all
150 // identify the motivation. 161 // identify the motivation.
151 bool omnibox_speculation_; 162 bool omnibox_speculation_;
152 bool subresource_speculation_; 163 bool subresource_speculation_;
153 DISALLOW_COPY_AND_ASSIGN(UseHistory); 164 DISALLOW_COPY_AND_ASSIGN(UseHistory);
154 }; 165 };
155 }; 166 };
156 167
157 } // namespace net 168 } // namespace net
158 169
159 #endif // NET_SOCKET_STREAM_SOCKET_H_ 170 #endif // NET_SOCKET_STREAM_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698