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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_tcp_server_unittest.cc

Issue 12210030: Linux/ChromeOS Chromium style checker cleanup, content/ edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 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) 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 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h" 5 #include "content/browser/renderer_host/p2p/socket_host_tcp_server.h"
6 6
7 #include "content/browser/renderer_host/p2p/socket_host_tcp.h" 7 #include "content/browser/renderer_host/p2p/socket_host_tcp.h"
8 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h" 8 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h"
9 #include "net/base/completion_callback.h" 9 #include "net/base/completion_callback.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 28 matching lines...) Expand all
39 // callback. 39 // callback.
40 net::CompletionCallback cb = accept_callback_; 40 net::CompletionCallback cb = accept_callback_;
41 accept_callback_.Reset(); 41 accept_callback_.Reset();
42 cb.Run(net::OK); 42 cb.Run(net::OK);
43 } else { 43 } else {
44 incoming_sockets_.push_back(socket); 44 incoming_sockets_.push_back(socket);
45 } 45 }
46 } 46 }
47 47
48 // net::ServerSocket implementation. 48 // net::ServerSocket implementation.
49 virtual void AllowAddressReuse() { 49 virtual void AllowAddressReuse() OVERRIDE {
50 } 50 }
51 51
52 virtual int Listen(const net::IPEndPoint& address, int backlog) OVERRIDE { 52 virtual int Listen(const net::IPEndPoint& address, int backlog) OVERRIDE {
53 local_address_ = address; 53 local_address_ = address;
54 listening_ = true; 54 listening_ = true;
55 return net::OK; 55 return net::OK;
56 } 56 }
57 57
58 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE { 58 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE {
59 *address = local_address_; 59 *address = local_address_;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 EXPECT_EQ(incoming1, GetSocketFormTcpSocketHost( 163 EXPECT_EQ(incoming1, GetSocketFormTcpSocketHost(
164 reinterpret_cast<P2PSocketHostTcp*>(new_host1.get()))); 164 reinterpret_cast<P2PSocketHostTcp*>(new_host1.get())));
165 scoped_ptr<P2PSocketHost> new_host2( 165 scoped_ptr<P2PSocketHost> new_host2(
166 socket_host_->AcceptIncomingTcpConnection(addr2, kAcceptedSocketId2)); 166 socket_host_->AcceptIncomingTcpConnection(addr2, kAcceptedSocketId2));
167 ASSERT_TRUE(new_host2.get() != NULL); 167 ASSERT_TRUE(new_host2.get() != NULL);
168 EXPECT_EQ(incoming2, GetSocketFormTcpSocketHost( 168 EXPECT_EQ(incoming2, GetSocketFormTcpSocketHost(
169 reinterpret_cast<P2PSocketHostTcp*>(new_host2.get()))); 169 reinterpret_cast<P2PSocketHostTcp*>(new_host2.get())));
170 } 170 }
171 171
172 } // namespace content 172 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698