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

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

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « net/dns/dns_transaction.cc ('k') | net/dns/host_resolver.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/values.h"
12 #include "net/base/address_family.h" 13 #include "net/base/address_family.h"
13 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
14 #include "net/base/host_port_pair.h" 15 #include "net/base/host_port_pair.h"
15 #include "net/base/net_export.h" 16 #include "net/base/net_export.h"
16 #include "net/base/net_util.h" 17 #include "net/base/net_util.h"
17 #include "net/base/prioritized_dispatcher.h" 18 #include "net/base/prioritized_dispatcher.h"
18 #include "net/base/request_priority.h" 19 #include "net/base/request_priority.h"
19 20
20 namespace base { 21 namespace base {
21 class Value; 22 class Value;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // Enable or disable the built-in asynchronous DnsClient. 178 // Enable or disable the built-in asynchronous DnsClient.
178 virtual void SetDnsClientEnabled(bool enabled); 179 virtual void SetDnsClientEnabled(bool enabled);
179 180
180 // Returns the HostResolverCache |this| uses, or NULL if there isn't one. 181 // Returns the HostResolverCache |this| uses, or NULL if there isn't one.
181 // Used primarily to clear the cache and for getting debug information. 182 // Used primarily to clear the cache and for getting debug information.
182 virtual HostCache* GetHostCache(); 183 virtual HostCache* GetHostCache();
183 184
184 // Returns the current DNS configuration |this| is using, as a Value, or NULL 185 // Returns the current DNS configuration |this| is using, as a Value, or NULL
185 // if it's configured to always use the system host resolver. Caller takes 186 // if it's configured to always use the system host resolver. Caller takes
186 // ownership of the returned Value. 187 // ownership of the returned Value.
187 virtual base::Value* GetDnsConfigAsValue() const; 188 virtual scoped_ptr<base::Value> GetDnsConfigAsValue() const;
188 189
189 // Creates a HostResolver implementation that queries the underlying system. 190 // Creates a HostResolver implementation that queries the underlying system.
190 // (Except if a unit-test has changed the global HostResolverProc using 191 // (Except if a unit-test has changed the global HostResolverProc using
191 // ScopedHostResolverProc to intercept requests to the system). 192 // ScopedHostResolverProc to intercept requests to the system).
192 static scoped_ptr<HostResolver> CreateSystemResolver( 193 static scoped_ptr<HostResolver> CreateSystemResolver(
193 const Options& options, 194 const Options& options,
194 NetLog* net_log); 195 NetLog* net_log);
195 196
196 // As above, but uses default parameters. 197 // As above, but uses default parameters.
197 static scoped_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log); 198 static scoped_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log);
198 199
199 protected: 200 protected:
200 HostResolver(); 201 HostResolver();
201 202
202 private: 203 private:
203 DISALLOW_COPY_AND_ASSIGN(HostResolver); 204 DISALLOW_COPY_AND_ASSIGN(HostResolver);
204 }; 205 };
205 206
206 } // namespace net 207 } // namespace net
207 208
208 #endif // NET_DNS_HOST_RESOLVER_H_ 209 #endif // NET_DNS_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/dns/dns_transaction.cc ('k') | net/dns/host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698