Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Side by Side Diff: net/dns/host_resolver_mojo.h

Issue 1928743003: DNS: Support reprioritization of requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make a couple of comment changes Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/dns/host_resolver_impl_unittest.cc ('k') | net/dns/host_resolver_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 14 matching lines...) Expand all
25 virtual ~Impl() = default; 25 virtual ~Impl() = default;
26 virtual void ResolveDns(interfaces::HostResolverRequestInfoPtr, 26 virtual void ResolveDns(interfaces::HostResolverRequestInfoPtr,
27 interfaces::HostResolverRequestClientPtr) = 0; 27 interfaces::HostResolverRequestClientPtr) = 0;
28 }; 28 };
29 29
30 // |impl| must outlive |this|. 30 // |impl| must outlive |this|.
31 explicit HostResolverMojo(Impl* impl); 31 explicit HostResolverMojo(Impl* impl);
32 ~HostResolverMojo() override; 32 ~HostResolverMojo() override;
33 33
34 // HostResolver overrides. 34 // HostResolver overrides.
35 // Note: |Resolve()| currently ignores |priority|.
35 int Resolve(const RequestInfo& info, 36 int Resolve(const RequestInfo& info,
36 RequestPriority priority, 37 RequestPriority priority,
37 AddressList* addresses, 38 AddressList* addresses,
38 const CompletionCallback& callback, 39 const CompletionCallback& callback,
39 RequestHandle* request_handle, 40 RequestHandle* request_handle,
40 const BoundNetLog& source_net_log) override; 41 const BoundNetLog& source_net_log) override;
41 int ResolveFromCache(const RequestInfo& info, 42 int ResolveFromCache(const RequestInfo& info,
42 AddressList* addresses, 43 AddressList* addresses,
43 const BoundNetLog& source_net_log) override; 44 const BoundNetLog& source_net_log) override;
45 void ChangeRequestPriority(RequestHandle req,
46 RequestPriority priority) override;
44 void CancelRequest(RequestHandle req) override; 47 void CancelRequest(RequestHandle req) override;
45 HostCache* GetHostCache() override; 48 HostCache* GetHostCache() override;
46 49
47 private: 50 private:
48 class Job; 51 class Job;
49 52
50 int ResolveFromCacheInternal(const RequestInfo& info, 53 int ResolveFromCacheInternal(const RequestInfo& info,
51 const HostCache::Key& key, 54 const HostCache::Key& key,
52 AddressList* addresses); 55 AddressList* addresses);
53 56
54 Impl* const impl_; 57 Impl* const impl_;
55 58
56 std::unique_ptr<HostCache> host_cache_; 59 std::unique_ptr<HostCache> host_cache_;
57 base::WeakPtrFactory<HostCache> host_cache_weak_factory_; 60 base::WeakPtrFactory<HostCache> host_cache_weak_factory_;
58 61
59 base::ThreadChecker thread_checker_; 62 base::ThreadChecker thread_checker_;
60 63
61 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); 64 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo);
62 }; 65 };
63 66
64 } // namespace net 67 } // namespace net
65 68
66 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_ 69 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_
OLDNEW
« no previous file with comments | « net/dns/host_resolver_impl_unittest.cc ('k') | net/dns/host_resolver_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698