| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE { | 153 virtual int SetMulticastLoopbackMode(bool loopback) OVERRIDE { |
| 154 NOTIMPLEMENTED(); | 154 NOTIMPLEMENTED(); |
| 155 return net::ERR_NOT_IMPLEMENTED; | 155 return net::ERR_NOT_IMPLEMENTED; |
| 156 } | 156 } |
| 157 | 157 |
| 158 virtual int SetDiffServCodePoint(net::DiffServCodePoint dscp) OVERRIDE { | 158 virtual int SetDiffServCodePoint(net::DiffServCodePoint dscp) OVERRIDE { |
| 159 NOTIMPLEMENTED(); | 159 NOTIMPLEMENTED(); |
| 160 return net::ERR_NOT_IMPLEMENTED; | 160 return net::ERR_NOT_IMPLEMENTED; |
| 161 } | 161 } |
| 162 | 162 |
| 163 virtual void DetachFromThread() OVERRIDE { |
| 164 NOTIMPLEMENTED(); |
| 165 } |
| 166 |
| 163 private: | 167 private: |
| 164 net::IPEndPoint address_; | 168 net::IPEndPoint address_; |
| 165 std::deque<UDPPacket>* sent_packets_; | 169 std::deque<UDPPacket>* sent_packets_; |
| 166 std::deque<UDPPacket> incoming_packets_; | 170 std::deque<UDPPacket> incoming_packets_; |
| 167 net::BoundNetLog net_log_; | 171 net::BoundNetLog net_log_; |
| 168 | 172 |
| 169 scoped_refptr<net::IOBuffer> recv_buffer_; | 173 scoped_refptr<net::IOBuffer> recv_buffer_; |
| 170 net::IPEndPoint* recv_address_; | 174 net::IPEndPoint* recv_address_; |
| 171 int recv_size_; | 175 int recv_size_; |
| 172 net::CompletionCallback recv_callback_; | 176 net::CompletionCallback recv_callback_; |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 socket_host_->Send(dest3, packet1, options, 0); | 380 socket_host_->Send(dest3, packet1, options, 0); |
| 377 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); | 381 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); |
| 378 // This packet should also be dropped. | 382 // This packet should also be dropped. |
| 379 socket_host_->Send(dest4, packet1, options, 0); | 383 socket_host_->Send(dest4, packet1, options, 0); |
| 380 // |dest1| is known, we can send as many packets to it. | 384 // |dest1| is known, we can send as many packets to it. |
| 381 socket_host_->Send(dest1_, packet1, options, 0); | 385 socket_host_->Send(dest1_, packet1, options, 0); |
| 382 ASSERT_EQ(sent_packets_.size(), 4U); | 386 ASSERT_EQ(sent_packets_.size(), 4U); |
| 383 } | 387 } |
| 384 | 388 |
| 385 } // namespace content | 389 } // namespace content |
| OLD | NEW |