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

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

Issue 2812983006: Revert "Add back "default address family" to HostResolver" (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 typedef base::Callback<void(std::unique_ptr<const base::Value>)> 206 typedef base::Callback<void(std::unique_ptr<const base::Value>)>
207 PersistCallback; 207 PersistCallback;
208 // Configures the HostResolver to be able to persist data (e.g. observed 208 // Configures the HostResolver to be able to persist data (e.g. observed
209 // performance) between sessions. |persist_callback| is a callback that will 209 // performance) between sessions. |persist_callback| is a callback that will
210 // be called when the HostResolver wants to persist data; |old_data| is the 210 // be called when the HostResolver wants to persist data; |old_data| is the
211 // data last persisted by the resolver on the previous session. 211 // data last persisted by the resolver on the previous session.
212 virtual void InitializePersistence( 212 virtual void InitializePersistence(
213 const PersistCallback& persist_callback, 213 const PersistCallback& persist_callback,
214 std::unique_ptr<const base::Value> old_data); 214 std::unique_ptr<const base::Value> old_data);
215 215
216 // Sets the default AddressFamily to use when requests have left it
217 // unspecified. For example, this could be used to restrict resolution
218 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to
219 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. See http://crbug.com/696569 for
220 // why this option is necessary.
221 virtual void SetDefaultAddressFamily(AddressFamily address_family);
222 virtual AddressFamily GetDefaultAddressFamily() const;
223
224 // Sets the HostResolver to assume that IPv6 is unreachable when on a wifi 216 // Sets the HostResolver to assume that IPv6 is unreachable when on a wifi
225 // connection. See https://crbug.com/696569 for further context. 217 // connection. See https://crbug.com/696569 for further context.
226 virtual void SetNoIPv6OnWifi(bool no_ipv6_on_wifi); 218 virtual void SetNoIPv6OnWifi(bool no_ipv6_on_wifi);
227 virtual bool GetNoIPv6OnWifi(); 219 virtual bool GetNoIPv6OnWifi();
228 220
229 // Creates a HostResolver implementation that queries the underlying system. 221 // Creates a HostResolver implementation that queries the underlying system.
230 // (Except if a unit-test has changed the global HostResolverProc using 222 // (Except if a unit-test has changed the global HostResolverProc using
231 // ScopedHostResolverProc to intercept requests to the system). 223 // ScopedHostResolverProc to intercept requests to the system).
232 static std::unique_ptr<HostResolver> CreateSystemResolver( 224 static std::unique_ptr<HostResolver> CreateSystemResolver(
233 const Options& options, 225 const Options& options,
(...skipping 14 matching lines...) Expand all
248 protected: 240 protected:
249 HostResolver(); 241 HostResolver();
250 242
251 private: 243 private:
252 DISALLOW_COPY_AND_ASSIGN(HostResolver); 244 DISALLOW_COPY_AND_ASSIGN(HostResolver);
253 }; 245 };
254 246
255 } // namespace net 247 } // namespace net
256 248
257 #endif // NET_DNS_HOST_RESOLVER_H_ 249 #endif // NET_DNS_HOST_RESOLVER_H_
OLDNEW
« no previous file with comments | « no previous file | net/dns/host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698