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

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

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 27 matching lines...) Expand all
38 int input_pos() const { return input_pos_; } 38 int input_pos() const { return input_pos_; }
39 bool read_pending() const { return read_pending_; } 39 bool read_pending() const { return read_pending_; }
40 void SetPeerAddress(const net::IPEndPoint& peer_address); 40 void SetPeerAddress(const net::IPEndPoint& peer_address);
41 void SetLocalAddress(const net::IPEndPoint& local_address); 41 void SetLocalAddress(const net::IPEndPoint& local_address);
42 42
43 // net::Socket implementation. 43 // net::Socket implementation.
44 virtual int Read(net::IOBuffer* buf, int buf_len, 44 virtual int Read(net::IOBuffer* buf, int buf_len,
45 const net::CompletionCallback& callback) OVERRIDE; 45 const net::CompletionCallback& callback) OVERRIDE;
46 virtual int Write(net::IOBuffer* buf, int buf_len, 46 virtual int Write(net::IOBuffer* buf, int buf_len,
47 const net::CompletionCallback& callback) OVERRIDE; 47 const net::CompletionCallback& callback) OVERRIDE;
48 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; 48 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
49 virtual int SetSendBufferSize(int32 size) OVERRIDE; 49 virtual bool SetSendBufferSize(int32 size) OVERRIDE;
50 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; 50 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE;
51 virtual void Disconnect() OVERRIDE; 51 virtual void Disconnect() OVERRIDE;
52 virtual bool IsConnected() const OVERRIDE; 52 virtual bool IsConnected() const OVERRIDE;
53 virtual bool IsConnectedAndIdle() const OVERRIDE; 53 virtual bool IsConnectedAndIdle() const OVERRIDE;
54 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE; 54 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE;
55 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE; 55 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE;
56 virtual const net::BoundNetLog& NetLog() const OVERRIDE; 56 virtual const net::BoundNetLog& NetLog() const OVERRIDE;
57 virtual void SetSubresourceSpeculation() OVERRIDE; 57 virtual void SetSubresourceSpeculation() OVERRIDE;
58 virtual void SetOmniboxSpeculation() OVERRIDE; 58 virtual void SetOmniboxSpeculation() OVERRIDE;
59 virtual bool WasEverUsed() const OVERRIDE; 59 virtual bool WasEverUsed() const OVERRIDE;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 MATCHER_P(MatchIncomingSocketMessage, address, "") { 106 MATCHER_P(MatchIncomingSocketMessage, address, "") {
107 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) 107 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID)
108 return false; 108 return false;
109 P2PMsg_OnIncomingTcpConnection::Param params; 109 P2PMsg_OnIncomingTcpConnection::Param params;
110 P2PMsg_OnIncomingTcpConnection::Read( 110 P2PMsg_OnIncomingTcpConnection::Read(
111 arg, &params); 111 arg, &params);
112 return params.b == address; 112 return params.b == address;
113 } 113 }
114 114
115 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 115 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698