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

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

Issue 9667025: [net/dns] Serve requests from HOSTS file if possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added MockDnsClient. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_DNS_CLIENT_H_
6 #define NET_DNS_DNS_CLIENT_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "net/base/net_export.h"
11
12 namespace net {
13
14 class DnsConfig;
15 class DnsTransactionFactory;
16 class NetLog;
17
18 // Convenience wrapper allows easy injection of DnsTransaction into
19 // HostResolverImpl.
20 class NET_EXPORT DnsClient {
21 public:
22 virtual ~DnsClient() {}
23
24 virtual void SetConfig(const DnsConfig& config) = 0;
25
26 virtual const DnsConfig* GetConfig() const = 0;
mmenke 2012/03/12 16:23:31 Should mention this returns NULL for invalid confi
27
28 virtual DnsTransactionFactory* GetTransactionFactory() = 0;
29
30 // Creates default client.
31 static scoped_ptr<DnsClient> CreateClient(NetLog* net_log);
32 };
33
34 } // namespace net
35
36 #endif // NET_DNS_DNS_CLIENT_H_
37
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698