| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 NetworkStateHandler* network_state_handler); | 42 NetworkStateHandler* network_state_handler); |
| 43 | 43 |
| 44 ~HostResolverImplChromeOS() override; | 44 ~HostResolverImplChromeOS() override; |
| 45 | 45 |
| 46 // HostResolverImpl | 46 // HostResolverImpl |
| 47 int Resolve(const RequestInfo& info, | 47 int Resolve(const RequestInfo& info, |
| 48 net::RequestPriority priority, | 48 net::RequestPriority priority, |
| 49 net::AddressList* addresses, | 49 net::AddressList* addresses, |
| 50 const net::CompletionCallback& callback, | 50 const net::CompletionCallback& callback, |
| 51 std::unique_ptr<Request>* out_req, | 51 std::unique_ptr<Request>* out_req, |
| 52 const net::BoundNetLog& source_net_log) override; | 52 const net::NetLogWithSource& source_net_log) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 friend class net::HostResolver; | 55 friend class net::HostResolver; |
| 56 class NetworkObserver; | 56 class NetworkObserver; |
| 57 | 57 |
| 58 HostResolverImplChromeOS( | 58 HostResolverImplChromeOS( |
| 59 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner, | 59 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner, |
| 60 NetworkStateHandler* network_state_handler, | 60 NetworkStateHandler* network_state_handler, |
| 61 const Options& options, | 61 const Options& options, |
| 62 net::NetLog* net_log); | 62 net::NetLog* net_log); |
| 63 | 63 |
| 64 void SetIPAddresses(const std::string& ipv4_address, | 64 void SetIPAddresses(const std::string& ipv4_address, |
| 65 const std::string& ipv6_address); | 65 const std::string& ipv6_address); |
| 66 | 66 |
| 67 bool ResolveLocalIPAddress(const RequestInfo& info, | 67 bool ResolveLocalIPAddress(const RequestInfo& info, |
| 68 net::AddressList* addresses); | 68 net::AddressList* addresses); |
| 69 | 69 |
| 70 std::string ipv4_address_; | 70 std::string ipv4_address_; |
| 71 std::string ipv6_address_; | 71 std::string ipv6_address_; |
| 72 base::ThreadChecker thread_checker_; | 72 base::ThreadChecker thread_checker_; |
| 73 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_; | 73 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_; |
| 74 base::WeakPtrFactory<HostResolverImplChromeOS> weak_ptr_factory_; | 74 base::WeakPtrFactory<HostResolverImplChromeOS> weak_ptr_factory_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(HostResolverImplChromeOS); | 76 DISALLOW_COPY_AND_ASSIGN(HostResolverImplChromeOS); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace chromeos | 79 } // namespace chromeos |
| 80 | 80 |
| 81 #endif // CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ | 81 #endif // CHROMEOS_NETWORK_HOST_RESOLVER_IMPL_CHROMEOS_H_ |
| OLD | NEW |