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

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

Issue 7768001: Add support for exporting IPC messages from component DLLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/renderer/blocked_plugin.cc ('k') | content/common/file_system_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 MATCHER_P(MatchMessage, type, "") { 259 MATCHER_P(MatchMessage, type, "") {
260 return arg->type() == type; 260 return arg->type() == type;
261 } 261 }
262 262
263 MATCHER_P(MatchPacketMessage, packet_content, "") { 263 MATCHER_P(MatchPacketMessage, packet_content, "") {
264 if (arg->type() != P2PMsg_OnDataReceived::ID) 264 if (arg->type() != P2PMsg_OnDataReceived::ID)
265 return false; 265 return false;
266 P2PMsg_OnDataReceived::Param params; 266 P2PMsg_OnDataReceived::Param params;
267 IPC::MessageWithTuple<P2PMsg_OnDataReceived::Param>::Read(arg, &params); 267 P2PMsg_OnDataReceived::Read(arg, &params);
268 return params.c == packet_content; 268 return params.c == packet_content;
269 } 269 }
270 270
271 MATCHER_P(MatchIncomingSocketMessage, address, "") { 271 MATCHER_P(MatchIncomingSocketMessage, address, "") {
272 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID) 272 if (arg->type() != P2PMsg_OnIncomingTcpConnection::ID)
273 return false; 273 return false;
274 P2PMsg_OnIncomingTcpConnection::Param params; 274 P2PMsg_OnIncomingTcpConnection::Param params;
275 IPC::MessageWithTuple<P2PMsg_OnIncomingTcpConnection::Param>::Read( 275 P2PMsg_OnIncomingTcpConnection::Read(
276 arg, &params); 276 arg, &params);
277 return params.b == address; 277 return params.b == address;
278 } 278 }
279 279
280 } // namespace 280 } // namespace
281 281
282 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_ 282 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/blocked_plugin.cc ('k') | content/common/file_system_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698