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

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

Issue 1096203006: Collect all ConnectionAttempts from both sockets in TransportConnectJob. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domrel_serverip1
Patch Set: Return fake ConnectionAttempt in MockTCPClientSocket Created 5 years, 7 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
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 <vector> 8 #include <vector>
9 9
10 #include "content/common/p2p_messages.h" 10 #include "content/common/p2p_messages.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 int GetPeerAddress(net::IPEndPoint* address) const override; 56 int GetPeerAddress(net::IPEndPoint* address) const override;
57 int GetLocalAddress(net::IPEndPoint* address) const override; 57 int GetLocalAddress(net::IPEndPoint* address) const override;
58 const net::BoundNetLog& NetLog() const override; 58 const net::BoundNetLog& NetLog() const override;
59 void SetSubresourceSpeculation() override; 59 void SetSubresourceSpeculation() override;
60 void SetOmniboxSpeculation() override; 60 void SetOmniboxSpeculation() override;
61 bool WasEverUsed() const override; 61 bool WasEverUsed() const override;
62 bool UsingTCPFastOpen() const override; 62 bool UsingTCPFastOpen() const override;
63 bool WasNpnNegotiated() const override; 63 bool WasNpnNegotiated() const override;
64 net::NextProto GetNegotiatedProtocol() const override; 64 net::NextProto GetNegotiatedProtocol() const override;
65 bool GetSSLInfo(net::SSLInfo* ssl_info) override; 65 bool GetSSLInfo(net::SSLInfo* ssl_info) override;
66 void GetConnectionAttempts(net::ConnectionAttempts* out) const override;
67 void ClearConnectionAttempts() override {}
68 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override {
69 }
66 70
67 private: 71 private:
68 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len, 72 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len,
69 const net::CompletionCallback& callback); 73 const net::CompletionCallback& callback);
70 74
71 bool read_pending_; 75 bool read_pending_;
72 scoped_refptr<net::IOBuffer> read_buffer_; 76 scoped_refptr<net::IOBuffer> read_buffer_;
73 int read_buffer_size_; 77 int read_buffer_size_;
74 net::CompletionCallback read_callback_; 78 net::CompletionCallback read_callback_;
75 79
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 MATCHER_P(MatchIncomingSocketMessage, address, "") { 112 MATCHER_P(MatchIncomingSocketMessage, address, "") {
109 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) 113 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID)
110 return false; 114 return false;
111 P2PMsg_OnIncomingTcpConnection::Param params; 115 P2PMsg_OnIncomingTcpConnection::Param params;
112 P2PMsg_OnIncomingTcpConnection::Read( 116 P2PMsg_OnIncomingTcpConnection::Read(
113 arg, &params); 117 arg, &params);
114 return get<1>(params) == address; 118 return get<1>(params) == address;
115 } 119 }
116 120
117 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 121 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698