| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 NET_DNS_HOST_RESOLVER_MOJO_H_ | 5 #ifndef NET_DNS_HOST_RESOLVER_MOJO_H_ |
| 6 #define NET_DNS_HOST_RESOLVER_MOJO_H_ | 6 #define NET_DNS_HOST_RESOLVER_MOJO_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // HostResolver overrides. | 34 // HostResolver overrides. |
| 35 int Resolve(const RequestInfo& info, | 35 int Resolve(const RequestInfo& info, |
| 36 RequestPriority priority, | 36 RequestPriority priority, |
| 37 AddressList* addresses, | 37 AddressList* addresses, |
| 38 const CompletionCallback& callback, | 38 const CompletionCallback& callback, |
| 39 RequestHandle* request_handle, | 39 RequestHandle* request_handle, |
| 40 const BoundNetLog& source_net_log) override; | 40 const BoundNetLog& source_net_log) override; |
| 41 int ResolveFromCache(const RequestInfo& info, | 41 int ResolveFromCache(const RequestInfo& info, |
| 42 AddressList* addresses, | 42 AddressList* addresses, |
| 43 const BoundNetLog& source_net_log) override; | 43 const BoundNetLog& source_net_log) override; |
| 44 void ChangeRequestPriority(RequestHandle req, |
| 45 RequestPriority priority) override; |
| 44 void CancelRequest(RequestHandle req) override; | 46 void CancelRequest(RequestHandle req) override; |
| 45 HostCache* GetHostCache() override; | 47 HostCache* GetHostCache() override; |
| 46 | 48 |
| 47 private: | 49 private: |
| 48 class Job; | 50 class Job; |
| 49 | 51 |
| 50 int ResolveFromCacheInternal(const RequestInfo& info, | 52 int ResolveFromCacheInternal(const RequestInfo& info, |
| 51 const HostCache::Key& key, | 53 const HostCache::Key& key, |
| 52 AddressList* addresses); | 54 AddressList* addresses); |
| 53 | 55 |
| 54 Impl* const impl_; | 56 Impl* const impl_; |
| 55 | 57 |
| 56 std::unique_ptr<HostCache> host_cache_; | 58 std::unique_ptr<HostCache> host_cache_; |
| 57 base::WeakPtrFactory<HostCache> host_cache_weak_factory_; | 59 base::WeakPtrFactory<HostCache> host_cache_weak_factory_; |
| 58 | 60 |
| 59 base::ThreadChecker thread_checker_; | 61 base::ThreadChecker thread_checker_; |
| 60 | 62 |
| 61 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); | 63 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace net | 66 } // namespace net |
| 65 | 67 |
| 66 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_ | 68 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_ |
| OLD | NEW |