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

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: Add a couple comments 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(ConnectionAttempts* out) const override;
67 void ClearConnectionAttempts() override {}
68 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {}
66 69
67 private: 70 private:
68 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len, 71 void DoAsyncWrite(scoped_refptr<net::IOBuffer> buf, int buf_len,
69 const net::CompletionCallback& callback); 72 const net::CompletionCallback& callback);
70 73
71 bool read_pending_; 74 bool read_pending_;
72 scoped_refptr<net::IOBuffer> read_buffer_; 75 scoped_refptr<net::IOBuffer> read_buffer_;
73 int read_buffer_size_; 76 int read_buffer_size_;
74 net::CompletionCallback read_callback_; 77 net::CompletionCallback read_callback_;
75 78
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 MATCHER_P(MatchIncomingSocketMessage, address, "") { 111 MATCHER_P(MatchIncomingSocketMessage, address, "") {
109 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) 112 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID)
110 return false; 113 return false;
111 P2PMsg_OnIncomingTcpConnection::Param params; 114 P2PMsg_OnIncomingTcpConnection::Param params;
112 P2PMsg_OnIncomingTcpConnection::Read( 115 P2PMsg_OnIncomingTcpConnection::Read(
113 arg, &params); 116 arg, &params);
114 return get<1>(params) == address; 117 return get<1>(params) == address;
115 } 118 }
116 119
117 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 120 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698