Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |