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/renderer/p2p/ipc_socket_factory.h" | 5 #include "content/renderer/p2p/ipc_socket_factory.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/metrics/field_trial.h" | 15 #include "base/metrics/field_trial.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
20 #include "base/trace_event/trace_event.h" | 20 #include "base/trace_event/trace_event.h" |
21 #include "content/renderer/media/webrtc_logging.h" | 21 #include "content/renderer/media/webrtc_logging.h" |
22 #include "content/renderer/p2p/host_address_request.h" | 22 #include "content/renderer/p2p/host_address_request.h" |
23 #include "content/renderer/p2p/socket_client_delegate.h" | 23 #include "content/renderer/p2p/socket_client_delegate.h" |
24 #include "content/renderer/p2p/socket_client_impl.h" | 24 #include "content/renderer/p2p/socket_client_impl.h" |
25 #include "content/renderer/p2p/socket_dispatcher.h" | 25 #include "content/renderer/p2p/socket_dispatcher.h" |
26 #include "jingle/glue/utils.h" | 26 #include "jingle/glue/utils.h" |
| 27 #include "net/base/ip_address.h" |
27 #include "third_party/webrtc/base/asyncpacketsocket.h" | 28 #include "third_party/webrtc/base/asyncpacketsocket.h" |
28 | 29 |
29 namespace content { | 30 namespace content { |
30 | 31 |
31 namespace { | 32 namespace { |
32 | 33 |
33 const int kDefaultNonSetOptionValue = -1; | 34 const int kDefaultNonSetOptionValue = -1; |
34 | 35 |
35 bool IsTcpClientSocket(P2PSocketType type) { | 36 bool IsTcpClientSocket(P2PSocketType type) { |
36 return (type == P2P_SOCKET_STUN_TCP_CLIENT) || | 37 return (type == P2P_SOCKET_STUN_TCP_CLIENT) || |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 } | 802 } |
802 | 803 |
803 rtc::AsyncResolverInterface* | 804 rtc::AsyncResolverInterface* |
804 IpcPacketSocketFactory::CreateAsyncResolver() { | 805 IpcPacketSocketFactory::CreateAsyncResolver() { |
805 scoped_ptr<AsyncAddressResolverImpl> resolver( | 806 scoped_ptr<AsyncAddressResolverImpl> resolver( |
806 new AsyncAddressResolverImpl(socket_dispatcher_)); | 807 new AsyncAddressResolverImpl(socket_dispatcher_)); |
807 return resolver.release(); | 808 return resolver.release(); |
808 } | 809 } |
809 | 810 |
810 } // namespace content | 811 } // namespace content |
OLD | NEW |