| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_H_ | 5 #ifndef NET_DNS_HOST_RESOLVER_H_ |
| 6 #define NET_DNS_HOST_RESOLVER_H_ | 6 #define NET_DNS_HOST_RESOLVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 virtual HostCache* GetHostCache(); | 173 virtual HostCache* GetHostCache(); |
| 174 | 174 |
| 175 // Returns the current DNS configuration |this| is using, as a Value, or NULL | 175 // Returns the current DNS configuration |this| is using, as a Value, or NULL |
| 176 // if it's configured to always use the system host resolver. Caller takes | 176 // if it's configured to always use the system host resolver. Caller takes |
| 177 // ownership of the returned Value. | 177 // ownership of the returned Value. |
| 178 virtual base::Value* GetDnsConfigAsValue() const; | 178 virtual base::Value* GetDnsConfigAsValue() const; |
| 179 | 179 |
| 180 // Creates a HostResolver implementation that queries the underlying system. | 180 // Creates a HostResolver implementation that queries the underlying system. |
| 181 // (Except if a unit-test has changed the global HostResolverProc using | 181 // (Except if a unit-test has changed the global HostResolverProc using |
| 182 // ScopedHostResolverProc to intercept requests to the system). | 182 // ScopedHostResolverProc to intercept requests to the system). |
| 183 static scoped_ptr<HostResolver> CreateSystemResolver( | 183 static scoped_ptr<HostResolver> CreateSystemResolver(const Options& options, |
| 184 const Options& options, | 184 NetLog* net_log); |
| 185 NetLog* net_log); | |
| 186 | 185 |
| 187 // As above, but uses default parameters. | 186 // As above, but uses default parameters. |
| 188 static scoped_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log); | 187 static scoped_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log); |
| 189 | 188 |
| 190 protected: | 189 protected: |
| 191 HostResolver(); | 190 HostResolver(); |
| 192 | 191 |
| 193 private: | 192 private: |
| 194 DISALLOW_COPY_AND_ASSIGN(HostResolver); | 193 DISALLOW_COPY_AND_ASSIGN(HostResolver); |
| 195 }; | 194 }; |
| 196 | 195 |
| 197 } // namespace net | 196 } // namespace net |
| 198 | 197 |
| 199 #endif // NET_DNS_HOST_RESOLVER_H_ | 198 #endif // NET_DNS_HOST_RESOLVER_H_ |
| OLD | NEW |