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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 cb.Run(size); | 110 cb.Run(size); |
111 } else { | 111 } else { |
112 incoming_packets_.push_back(UDPPacket(address, data)); | 112 incoming_packets_.push_back(UDPPacket(address, data)); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 const net::BoundNetLog& NetLog() const override { return net_log_; } | 116 const net::BoundNetLog& NetLog() const override { return net_log_; } |
117 | 117 |
118 void AllowAddressReuse() override { NOTIMPLEMENTED(); } | 118 void AllowAddressReuse() override { NOTIMPLEMENTED(); } |
119 | 119 |
120 void AllowBroadcast() override { NOTIMPLEMENTED(); } | 120 int SetBroadcast(bool broadcast) override { |
| 121 NOTIMPLEMENTED(); |
| 122 return net::ERR_NOT_IMPLEMENTED; |
| 123 } |
121 | 124 |
122 int JoinGroup(const net::IPAddressNumber& group_address) const override { | 125 int JoinGroup(const net::IPAddressNumber& group_address) const override { |
123 NOTIMPLEMENTED(); | 126 NOTIMPLEMENTED(); |
124 return net::ERR_NOT_IMPLEMENTED; | 127 return net::ERR_NOT_IMPLEMENTED; |
125 } | 128 } |
126 | 129 |
127 int LeaveGroup(const net::IPAddressNumber& group_address) const override { | 130 int LeaveGroup(const net::IPAddressNumber& group_address) const override { |
128 NOTIMPLEMENTED(); | 131 NOTIMPLEMENTED(); |
129 return net::ERR_NOT_IMPLEMENTED; | 132 return net::ERR_NOT_IMPLEMENTED; |
130 } | 133 } |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 socket_host_->Send(dest3, packet1, options, 0); | 370 socket_host_->Send(dest3, packet1, options, 0); |
368 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); | 371 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); |
369 // This packet should also be dropped. | 372 // This packet should also be dropped. |
370 socket_host_->Send(dest4, packet1, options, 0); | 373 socket_host_->Send(dest4, packet1, options, 0); |
371 // |dest1| is known, we can send as many packets to it. | 374 // |dest1| is known, we can send as many packets to it. |
372 socket_host_->Send(dest1_, packet1, options, 0); | 375 socket_host_->Send(dest1_, packet1, options, 0); |
373 ASSERT_EQ(sent_packets_.size(), 4U); | 376 ASSERT_EQ(sent_packets_.size(), 4U); |
374 } | 377 } |
375 | 378 |
376 } // namespace content | 379 } // namespace content |
OLD | NEW |