| OLD | NEW |
| 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 #include "content/browser/renderer_host/p2p/socket_host_udp.h" | 5 #include "content/browser/renderer_host/p2p/socket_host_udp.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 109 } |
| 110 | 110 |
| 111 virtual void AllowAddressReuse() OVERRIDE { | 111 virtual void AllowAddressReuse() OVERRIDE { |
| 112 NOTIMPLEMENTED(); | 112 NOTIMPLEMENTED(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 virtual void AllowBroadcast() OVERRIDE { | 115 virtual void AllowBroadcast() OVERRIDE { |
| 116 NOTIMPLEMENTED(); | 116 NOTIMPLEMENTED(); |
| 117 } | 117 } |
| 118 | 118 |
| 119 virtual int JoinGroup( |
| 120 const net::IPAddressNumber& group_address) const OVERRIDE { |
| 121 NOTIMPLEMENTED(); |
| 122 return net::ERR_NOT_IMPLEMENTED; |
| 123 } |
| 124 |
| 125 virtual int LeaveGroup( |
| 126 const net::IPAddressNumber& group_address) const OVERRIDE { |
| 127 NOTIMPLEMENTED(); |
| 128 return net::ERR_NOT_IMPLEMENTED; |
| 129 } |
| 130 |
| 131 virtual int SetMulticastTimeToLive(int time_to_live) OVERRIDE { |
| 132 NOTIMPLEMENTED(); |
| 133 return net::ERR_NOT_IMPLEMENTED; |
| 134 } |
| 135 |
| 136 virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE { |
| 137 NOTIMPLEMENTED(); |
| 138 return net::ERR_NOT_IMPLEMENTED; |
| 139 } |
| 140 |
| 119 private: | 141 private: |
| 120 net::IPEndPoint address_; | 142 net::IPEndPoint address_; |
| 121 std::deque<UDPPacket>* sent_packets_; | 143 std::deque<UDPPacket>* sent_packets_; |
| 122 std::deque<UDPPacket> incoming_packets_; | 144 std::deque<UDPPacket> incoming_packets_; |
| 123 net::BoundNetLog net_log_; | 145 net::BoundNetLog net_log_; |
| 124 | 146 |
| 125 scoped_refptr<net::IOBuffer> recv_buffer_; | 147 scoped_refptr<net::IOBuffer> recv_buffer_; |
| 126 net::IPEndPoint* recv_address_; | 148 net::IPEndPoint* recv_address_; |
| 127 int recv_size_; | 149 int recv_size_; |
| 128 net::CompletionCallback recv_callback_; | 150 net::CompletionCallback recv_callback_; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // Should fail when trying to send the same packet to |dest2_|. | 283 // Should fail when trying to send the same packet to |dest2_|. |
| 262 std::vector<char> packet; | 284 std::vector<char> packet; |
| 263 CreateRandomPacket(&packet); | 285 CreateRandomPacket(&packet); |
| 264 EXPECT_CALL(sender_, Send( | 286 EXPECT_CALL(sender_, Send( |
| 265 MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID)))) | 287 MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID)))) |
| 266 .WillOnce(DoAll(DeleteArg<0>(), Return(true))); | 288 .WillOnce(DoAll(DeleteArg<0>(), Return(true))); |
| 267 socket_host_->Send(dest2_, packet); | 289 socket_host_->Send(dest2_, packet); |
| 268 } | 290 } |
| 269 | 291 |
| 270 } // namespace content | 292 } // namespace content |
| OLD | NEW |