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

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

Issue 2083463002: Replace //net TypeConverters with StructTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-converter-cleanup--gurl
Patch Set: rebase Created 4 years, 2 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
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"
11 #include "net/dns/host_cache.h" 11 #include "net/dns/host_cache.h"
12 #include "net/dns/host_resolver.h" 12 #include "net/dns/host_resolver.h"
13 #include "net/interfaces/host_resolver_service.mojom.h" 13 #include "net/interfaces/host_resolver_service.mojom.h"
14 14
15 namespace net { 15 namespace net {
16 class AddressList; 16 class AddressList;
17 class NetLogWithSource; 17 class NetLogWithSource;
18 18
19 // A HostResolver implementation that converts requests to mojo types and 19 // A HostResolver implementation that converts requests to mojo types and
20 // forwards them to a mojo Impl interface. 20 // forwards them to a mojo Impl interface.
21 class HostResolverMojo : public HostResolver { 21 class HostResolverMojo : public HostResolver {
22 public: 22 public:
23 class Impl { 23 class Impl {
24 public: 24 public:
25 virtual ~Impl() = default; 25 virtual ~Impl() = default;
26 virtual void ResolveDns(interfaces::HostResolverRequestInfoPtr, 26 virtual void ResolveDns(
27 interfaces::HostResolverRequestClientPtr) = 0; 27 std::unique_ptr<HostResolver::RequestInfo> request_info,
28 interfaces::HostResolverRequestClientPtr) = 0;
28 }; 29 };
29 30
30 // |impl| must outlive |this|. 31 // |impl| must outlive |this|.
31 explicit HostResolverMojo(Impl* impl); 32 explicit HostResolverMojo(Impl* impl);
32 ~HostResolverMojo() override; 33 ~HostResolverMojo() override;
33 34
34 // HostResolver overrides. 35 // HostResolver overrides.
35 // Note: |Resolve()| currently ignores |priority|. 36 // Note: |Resolve()| currently ignores |priority|.
36 int Resolve(const RequestInfo& info, 37 int Resolve(const RequestInfo& info,
37 RequestPriority priority, 38 RequestPriority priority,
(...skipping 20 matching lines...) Expand all
58 base::WeakPtrFactory<HostCache> host_cache_weak_factory_; 59 base::WeakPtrFactory<HostCache> host_cache_weak_factory_;
59 60
60 base::ThreadChecker thread_checker_; 61 base::ThreadChecker thread_checker_;
61 62
62 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo); 63 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo);
63 }; 64 };
64 65
65 } // namespace net 66 } // namespace net
66 67
67 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_ 68 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_
OLDNEW
« no previous file with comments | « net/dns/OWNERS ('k') | net/dns/host_resolver_mojo.cc » ('j') | net/dns/mojo_host_resolver_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698