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/log/net_log_with_source.h" |
21 #include "net/udp/datagram_server_socket.h" | 21 #include "net/socket/datagram_server_socket.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 using ::testing::_; | 25 using ::testing::_; |
26 using ::testing::DeleteArg; | 26 using ::testing::DeleteArg; |
27 using ::testing::DoAll; | 27 using ::testing::DoAll; |
28 using ::testing::Return; | 28 using ::testing::Return; |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 std::unique_ptr<P2PSocketHostUdp> socket_host( | 567 std::unique_ptr<P2PSocketHostUdp> socket_host( |
568 new P2PSocketHostUdp(&sender, 0, &throttler, fake_socket_factory)); | 568 new P2PSocketHostUdp(&sender, 0, &throttler, fake_socket_factory)); |
569 net::IPEndPoint local_address = | 569 net::IPEndPoint local_address = |
570 ParseAddress(kTestLocalIpAddress, invalid_port); | 570 ParseAddress(kTestLocalIpAddress, invalid_port); |
571 bool rv = socket_host->Init(local_address, min_port, max_port, | 571 bool rv = socket_host->Init(local_address, min_port, max_port, |
572 P2PHostAndIPEndPoint()); | 572 P2PHostAndIPEndPoint()); |
573 EXPECT_FALSE(rv); | 573 EXPECT_FALSE(rv); |
574 } | 574 } |
575 | 575 |
576 } // namespace content | 576 } // namespace content |
OLD | NEW |