OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ | 5 #ifndef CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ |
6 #define CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ | 6 #define CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
10 #include "chromeos/chromeos_export.h" | 10 #include "chromeos/chromeos_export.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 NetworkStateHandler* network_state_handler); | 41 NetworkStateHandler* network_state_handler); |
42 | 42 |
43 virtual ~HostResolverImplChromeOS(); | 43 virtual ~HostResolverImplChromeOS(); |
44 | 44 |
45 // HostResolverImpl | 45 // HostResolverImpl |
46 virtual int Resolve(const RequestInfo& info, | 46 virtual int Resolve(const RequestInfo& info, |
47 net::RequestPriority priority, | 47 net::RequestPriority priority, |
48 net::AddressList* addresses, | 48 net::AddressList* addresses, |
49 const net::CompletionCallback& callback, | 49 const net::CompletionCallback& callback, |
50 RequestHandle* out_req, | 50 RequestHandle* out_req, |
51 const net::BoundNetLog& source_net_log) OVERRIDE; | 51 const net::BoundNetLog& source_net_log) override; |
52 | 52 |
53 private: | 53 private: |
54 friend class net::HostResolver; | 54 friend class net::HostResolver; |
55 class NetworkObserver; | 55 class NetworkObserver; |
56 | 56 |
57 HostResolverImplChromeOS( | 57 HostResolverImplChromeOS( |
58 scoped_refptr<base::MessageLoopProxy> network_handler_message_loop, | 58 scoped_refptr<base::MessageLoopProxy> network_handler_message_loop, |
59 NetworkStateHandler* network_state_handler, | 59 NetworkStateHandler* network_state_handler, |
60 const Options& options, | 60 const Options& options, |
61 net::NetLog* net_log); | 61 net::NetLog* net_log); |
62 | 62 |
63 void SetIPAddresses(const std::string& ipv4_address, | 63 void SetIPAddresses(const std::string& ipv4_address, |
64 const std::string& ipv6_address); | 64 const std::string& ipv6_address); |
65 | 65 |
66 bool ResolveLocalIPAddress(const RequestInfo& info, | 66 bool ResolveLocalIPAddress(const RequestInfo& info, |
67 net::AddressList* addresses); | 67 net::AddressList* addresses); |
68 | 68 |
69 std::string ipv4_address_; | 69 std::string ipv4_address_; |
70 std::string ipv6_address_; | 70 std::string ipv6_address_; |
71 base::ThreadChecker thread_checker_; | 71 base::ThreadChecker thread_checker_; |
72 scoped_refptr<base::MessageLoopProxy> network_handler_message_loop_; | 72 scoped_refptr<base::MessageLoopProxy> network_handler_message_loop_; |
73 base::WeakPtrFactory<HostResolverImplChromeOS> weak_ptr_factory_; | 73 base::WeakPtrFactory<HostResolverImplChromeOS> weak_ptr_factory_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(HostResolverImplChromeOS); | 75 DISALLOW_COPY_AND_ASSIGN(HostResolverImplChromeOS); |
76 }; | 76 }; |
77 | 77 |
78 } // namespace chromeos | 78 } // namespace chromeos |
79 | 79 |
80 #endif // CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ | 80 #endif // CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ |
OLD | NEW |