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

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

Issue 904313003: Implement utility-side host resolver Mojo client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-proxy-resolver
Patch Set: Created 5 years, 10 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_DNS_HOST_RESOLVER_MOJO_H_
6 #define NET_DNS_HOST_RESOLVER_MOJO_H_
7
8 #include "base/threading/thread_checker.h"
9 #include "net/base/address_list.h"
Anand Mistry (off Chromium) 2015/02/16 06:32:44 You can forward-declare this one.
Sam McNally 2015/02/16 07:24:44 Done.
10 #include "net/dns/host_resolver.h"
11 #include "net/interfaces/host_resolver_service.mojom.h"
12
13 namespace net {
14
15 class BoundNetLog;
16
17 class HostResolverMojo : public HostResolver {
Anand Mistry (off Chromium) 2015/02/16 06:32:44 Add a short blurb here about what this is.
Sam McNally 2015/02/16 07:24:44 Done.
18 public:
19 HostResolverMojo(interfaces::HostResolverPtr resolver,
20 mojo::ErrorHandler* error_handler);
Anand Mistry (off Chromium) 2015/02/16 06:32:44 I'm having a hard time liking passing in an error
Sam McNally 2015/02/16 07:24:44 Switched to a callback. I'd prefer to avoid leavin
21 ~HostResolverMojo() override;
22
23 // HostResolver overrides.
24 int Resolve(const RequestInfo& info,
25 RequestPriority priority,
26 AddressList* addresses,
27 const CompletionCallback& callback,
28 RequestHandle* request_handle,
29 const BoundNetLog& source_net_log) override;
30 int ResolveFromCache(const RequestInfo& info,
31 AddressList* addresses,
32 const BoundNetLog& source_net_log) override;
33 void CancelRequest(RequestHandle req) override;
34
35 private:
36 class Job;
37
38 interfaces::HostResolverPtr resolver_;
39
40 base::ThreadChecker thread_checker_;
41
42 DISALLOW_COPY_AND_ASSIGN(HostResolverMojo);
43 };
44
45 } // namespace net
46
47 #endif // NET_DNS_HOST_RESOLVER_MOJO_H_
OLDNEW
« no previous file with comments | « net/BUILD.gn ('k') | net/dns/host_resolver_mojo.cc » ('j') | net/dns/host_resolver_mojo.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698