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

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

Issue 2811183003: Change Cronet's "disable_ipv6" to "disable_ipv6_on_wifi" (Closed)
Patch Set: MockNetworkChangeNotifier 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 216 // Sets the default AddressFamily to use when requests have left it
217 // unspecified. For example, this could be used to restrict resolution 217 // unspecified. For example, this could be used to restrict resolution
218 // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to 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 219 // AF_INET6 by passing in ADDRESS_FAMILY_IPV6. See http://crbug.com/696569 for
220 // why this option is necessary. 220 // why this option is necessary.
221 virtual void SetDefaultAddressFamily(AddressFamily address_family); 221 virtual void SetDefaultAddressFamily(AddressFamily address_family);
222 virtual AddressFamily GetDefaultAddressFamily() const; 222 virtual AddressFamily GetDefaultAddressFamily() const;
223 223
224 // Sets the HostResolver to assume that IPv6 is unreachable when on a wifi
225 // connection. See http://crbug.com/696569 for further context.
pauljensen 2017/04/13 17:17:01 nit:https
mgersh 2017/04/13 19:07:20 Done.
226 virtual void SetNoIPv6OnWifi();
pauljensen 2017/04/13 17:17:01 This should probably take a bool. Calling it "ena
mgersh 2017/04/13 19:07:20 Done.
227 virtual bool GetNoIPv6OnWifi();
228
224 // Creates a HostResolver implementation that queries the underlying system. 229 // Creates a HostResolver implementation that queries the underlying system.
225 // (Except if a unit-test has changed the global HostResolverProc using 230 // (Except if a unit-test has changed the global HostResolverProc using
226 // ScopedHostResolverProc to intercept requests to the system). 231 // ScopedHostResolverProc to intercept requests to the system).
227 static std::unique_ptr<HostResolver> CreateSystemResolver( 232 static std::unique_ptr<HostResolver> CreateSystemResolver(
228 const Options& options, 233 const Options& options,
229 NetLog* net_log); 234 NetLog* net_log);
230 // Same, but explicitly returns the HostResolverImpl. Only used by 235 // Same, but explicitly returns the HostResolverImpl. Only used by
231 // StaleHostResolver in cronet. 236 // StaleHostResolver in cronet.
232 static std::unique_ptr<HostResolverImpl> CreateSystemResolverImpl( 237 static std::unique_ptr<HostResolverImpl> CreateSystemResolverImpl(
233 const Options& options, 238 const Options& options,
234 NetLog* net_log); 239 NetLog* net_log);
235 240
236 // As above, but uses default parameters. 241 // As above, but uses default parameters.
237 static std::unique_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log); 242 static std::unique_ptr<HostResolver> CreateDefaultResolver(NetLog* net_log);
238 // Same, but explicitly returns the HostResolverImpl. Only used by 243 // Same, but explicitly returns the HostResolverImpl. Only used by
239 // StaleHostResolver in cronet. 244 // StaleHostResolver in cronet.
240 static std::unique_ptr<HostResolverImpl> CreateDefaultResolverImpl( 245 static std::unique_ptr<HostResolverImpl> CreateDefaultResolverImpl(
241 NetLog* net_log); 246 NetLog* net_log);
242 247
243 protected: 248 protected:
244 HostResolver(); 249 HostResolver();
245 250
246 private: 251 private:
247 DISALLOW_COPY_AND_ASSIGN(HostResolver); 252 DISALLOW_COPY_AND_ASSIGN(HostResolver);
248 }; 253 };
249 254
250 } // namespace net 255 } // namespace net
251 256
252 #endif // NET_DNS_HOST_RESOLVER_H_ 257 #endif // NET_DNS_HOST_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698