| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 virtual int SetMulticastTimeToLive(int time_to_live) OVERRIDE { | 131 virtual int SetMulticastTimeToLive(int time_to_live) OVERRIDE { |
| 132 NOTIMPLEMENTED(); | 132 NOTIMPLEMENTED(); |
| 133 return net::ERR_NOT_IMPLEMENTED; | 133 return net::ERR_NOT_IMPLEMENTED; |
| 134 } | 134 } |
| 135 | 135 |
| 136 virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE { | 136 virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE { |
| 137 NOTIMPLEMENTED(); | 137 NOTIMPLEMENTED(); |
| 138 return net::ERR_NOT_IMPLEMENTED; | 138 return net::ERR_NOT_IMPLEMENTED; |
| 139 } | 139 } |
| 140 | 140 |
| 141 virtual int SetToS(net::DiffServCodePoint dscp) OVERRIDE { |
| 142 NOTIMPLEMENTED(); |
| 143 return net::ERR_NOT_IMPLEMENTED; |
| 144 } |
| 145 |
| 141 private: | 146 private: |
| 142 net::IPEndPoint address_; | 147 net::IPEndPoint address_; |
| 143 std::deque<UDPPacket>* sent_packets_; | 148 std::deque<UDPPacket>* sent_packets_; |
| 144 std::deque<UDPPacket> incoming_packets_; | 149 std::deque<UDPPacket> incoming_packets_; |
| 145 net::BoundNetLog net_log_; | 150 net::BoundNetLog net_log_; |
| 146 | 151 |
| 147 scoped_refptr<net::IOBuffer> recv_buffer_; | 152 scoped_refptr<net::IOBuffer> recv_buffer_; |
| 148 net::IPEndPoint* recv_address_; | 153 net::IPEndPoint* recv_address_; |
| 149 int recv_size_; | 154 int recv_size_; |
| 150 net::CompletionCallback recv_callback_; | 155 net::CompletionCallback recv_callback_; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 // Should fail when trying to send the same packet to |dest2_|. | 288 // Should fail when trying to send the same packet to |dest2_|. |
| 284 std::vector<char> packet; | 289 std::vector<char> packet; |
| 285 CreateRandomPacket(&packet); | 290 CreateRandomPacket(&packet); |
| 286 EXPECT_CALL(sender_, Send( | 291 EXPECT_CALL(sender_, Send( |
| 287 MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID)))) | 292 MatchMessage(static_cast<uint32>(P2PMsg_OnError::ID)))) |
| 288 .WillOnce(DoAll(DeleteArg<0>(), Return(true))); | 293 .WillOnce(DoAll(DeleteArg<0>(), Return(true))); |
| 289 socket_host_->Send(dest2_, packet); | 294 socket_host_->Send(dest2_, packet); |
| 290 } | 295 } |
| 291 | 296 |
| 292 } // namespace content | 297 } // namespace content |
| OLD | NEW |