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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 recv_callback_.Reset(); | 108 recv_callback_.Reset(); |
109 recv_buffer_ = NULL; | 109 recv_buffer_ = NULL; |
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 int AllowAddressReuse() override { |
| 119 NOTIMPLEMENTED(); |
| 120 return net::ERR_NOT_IMPLEMENTED; |
| 121 } |
119 | 122 |
120 void AllowBroadcast() override { NOTIMPLEMENTED(); } | 123 int DisallowAddressReuse() override { |
| 124 NOTIMPLEMENTED(); |
| 125 return net::ERR_NOT_IMPLEMENTED; |
| 126 } |
| 127 |
| 128 int AllowBroadcast() override { |
| 129 NOTIMPLEMENTED(); |
| 130 return net::ERR_NOT_IMPLEMENTED; |
| 131 } |
| 132 |
| 133 int DisallowBroadcast() override { |
| 134 NOTIMPLEMENTED(); |
| 135 return net::ERR_NOT_IMPLEMENTED; |
| 136 } |
121 | 137 |
122 int JoinGroup(const net::IPAddressNumber& group_address) const override { | 138 int JoinGroup(const net::IPAddressNumber& group_address) const override { |
123 NOTIMPLEMENTED(); | 139 NOTIMPLEMENTED(); |
124 return net::ERR_NOT_IMPLEMENTED; | 140 return net::ERR_NOT_IMPLEMENTED; |
125 } | 141 } |
126 | 142 |
127 int LeaveGroup(const net::IPAddressNumber& group_address) const override { | 143 int LeaveGroup(const net::IPAddressNumber& group_address) const override { |
128 NOTIMPLEMENTED(); | 144 NOTIMPLEMENTED(); |
129 return net::ERR_NOT_IMPLEMENTED; | 145 return net::ERR_NOT_IMPLEMENTED; |
130 } | 146 } |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 socket_host_->Send(dest3, packet1, options, 0); | 383 socket_host_->Send(dest3, packet1, options, 0); |
368 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); | 384 net::IPEndPoint dest4 = ParseAddress(kTestIpAddress1, 2224); |
369 // This packet should also be dropped. | 385 // This packet should also be dropped. |
370 socket_host_->Send(dest4, packet1, options, 0); | 386 socket_host_->Send(dest4, packet1, options, 0); |
371 // |dest1| is known, we can send as many packets to it. | 387 // |dest1| is known, we can send as many packets to it. |
372 socket_host_->Send(dest1_, packet1, options, 0); | 388 socket_host_->Send(dest1_, packet1, options, 0); |
373 ASSERT_EQ(sent_packets_.size(), 4U); | 389 ASSERT_EQ(sent_packets_.size(), 4U); |
374 } | 390 } |
375 | 391 |
376 } // namespace content | 392 } // namespace content |
OLD | NEW |