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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_test_utils.h

Issue 2525743002: Make URLRequestContext a MemoryDumpProvider (Abandoned) (Closed)
Patch Set: rebased to 7f3d142161b15869f6bea58ac43c5f52ce5834ac 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 CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 void SetOmniboxSpeculation() override; 65 void SetOmniboxSpeculation() override;
66 bool WasEverUsed() const override; 66 bool WasEverUsed() const override;
67 bool WasNpnNegotiated() const override; 67 bool WasNpnNegotiated() const override;
68 net::NextProto GetNegotiatedProtocol() const override; 68 net::NextProto GetNegotiatedProtocol() const override;
69 bool GetSSLInfo(net::SSLInfo* ssl_info) override; 69 bool GetSSLInfo(net::SSLInfo* ssl_info) override;
70 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; 70 void GetConnectionAttempts(net::ConnectionAttempts* out) const override;
71 void ClearConnectionAttempts() override {} 71 void ClearConnectionAttempts() override {}
72 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { 72 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override {
73 } 73 }
74 int64_t GetTotalReceivedBytes() const override; 74 int64_t GetTotalReceivedBytes() const override;
75 void DumpMemoryStats(
76 base::trace_event::MemoryAllocatorDump* dump) const override {}
75 77
76 private: 78 private:
77 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len, 79 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len,
78 const net::CompletionCallback& callback); 80 const net::CompletionCallback& callback);
79 81
80 bool read_pending_; 82 bool read_pending_;
81 scoped_refptr<net::IOBuffer> read_buffer_; 83 scoped_refptr<net::IOBuffer> read_buffer_;
82 int read_buffer_size_; 84 int read_buffer_size_;
83 net::CompletionCallback read_callback_; 85 net::CompletionCallback read_callback_;
84 86
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 MATCHER_P(MatchIncomingSocketMessage, address, "") { 119 MATCHER_P(MatchIncomingSocketMessage, address, "") {
118 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) 120 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID)
119 return false; 121 return false;
120 P2PMsg_OnIncomingTcpConnection::Param params; 122 P2PMsg_OnIncomingTcpConnection::Param params;
121 P2PMsg_OnIncomingTcpConnection::Read( 123 P2PMsg_OnIncomingTcpConnection::Read(
122 arg, &params); 124 arg, &params);
123 return std::get<1>(params) == address; 125 return std::get<1>(params) == address;
124 } 126 }
125 127
126 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 128 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698