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 <stdint.h> | 7 #include <stdint.h> |
8 #include <deque> | 8 #include <deque> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/sys_byteorder.h" | 14 #include "base/sys_byteorder.h" |
15 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h" | 15 #include "content/browser/renderer_host/p2p/socket_host_test_utils.h" |
16 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" | 16 #include "content/browser/renderer_host/p2p/socket_host_throttler.h" |
17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
18 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
| 20 #include "net/log/net_log_with_source.h" |
20 #include "net/udp/datagram_server_socket.h" | 21 #include "net/udp/datagram_server_socket.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
23 | 24 |
24 using ::testing::_; | 25 using ::testing::_; |
25 using ::testing::DeleteArg; | 26 using ::testing::DeleteArg; |
26 using ::testing::DoAll; | 27 using ::testing::DoAll; |
27 using ::testing::Return; | 28 using ::testing::Return; |
28 | 29 |
29 namespace { | 30 namespace { |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 std::unique_ptr<P2PSocketHostUdp> socket_host( | 511 std::unique_ptr<P2PSocketHostUdp> socket_host( |
511 new P2PSocketHostUdp(&sender, 0, &throttler, fake_socket_factory)); | 512 new P2PSocketHostUdp(&sender, 0, &throttler, fake_socket_factory)); |
512 net::IPEndPoint local_address = | 513 net::IPEndPoint local_address = |
513 ParseAddress(kTestLocalIpAddress, invalid_port); | 514 ParseAddress(kTestLocalIpAddress, invalid_port); |
514 bool rv = socket_host->Init(local_address, min_port, max_port, | 515 bool rv = socket_host->Init(local_address, min_port, max_port, |
515 P2PHostAndIPEndPoint()); | 516 P2PHostAndIPEndPoint()); |
516 EXPECT_FALSE(rv); | 517 EXPECT_FALSE(rv); |
517 } | 518 } |
518 | 519 |
519 } // namespace content | 520 } // namespace content |
OLD | NEW |