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 "net/dns/dns_client.h" | 5 #include "net/dns/dns_client.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "net/dns/address_sorter.h" | 12 #include "net/dns/address_sorter.h" |
13 #include "net/dns/dns_config_service.h" | 13 #include "net/dns/dns_config_service.h" |
14 #include "net/dns/dns_session.h" | 14 #include "net/dns/dns_session.h" |
15 #include "net/dns/dns_socket_pool.h" | 15 #include "net/dns/dns_socket_pool.h" |
16 #include "net/dns/dns_transaction.h" | 16 #include "net/dns/dns_transaction.h" |
17 #include "net/log/net_log.h" | |
18 #include "net/socket/client_socket_factory.h" | 17 #include "net/socket/client_socket_factory.h" |
19 | 18 |
| 19 namespace base { |
| 20 class Value; |
| 21 } |
| 22 |
20 namespace net { | 23 namespace net { |
21 | 24 |
22 namespace { | 25 namespace { |
23 | 26 |
24 class DnsClientImpl : public DnsClient { | 27 class DnsClientImpl : public DnsClient { |
25 public: | 28 public: |
26 DnsClientImpl(NetLog* net_log, | 29 DnsClientImpl(NetLog* net_log, |
27 ClientSocketFactory* socket_factory, | 30 ClientSocketFactory* socket_factory, |
28 const RandIntCallback& rand_int_callback) | 31 const RandIntCallback& rand_int_callback) |
29 : address_sorter_(AddressSorter::CreateAddressSorter()), | 32 : address_sorter_(AddressSorter::CreateAddressSorter()), |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 std::unique_ptr<DnsClient> DnsClient::CreateClientForTesting( | 97 std::unique_ptr<DnsClient> DnsClient::CreateClientForTesting( |
95 NetLog* net_log, | 98 NetLog* net_log, |
96 ClientSocketFactory* socket_factory, | 99 ClientSocketFactory* socket_factory, |
97 const RandIntCallback& rand_int_callback) { | 100 const RandIntCallback& rand_int_callback) { |
98 return base::WrapUnique( | 101 return base::WrapUnique( |
99 new DnsClientImpl(net_log, socket_factory, rand_int_callback)); | 102 new DnsClientImpl(net_log, socket_factory, rand_int_callback)); |
100 } | 103 } |
101 | 104 |
102 } // namespace net | 105 } // namespace net |
103 | 106 |
OLD | NEW |