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

Unified Diff: net/dns/host_resolver_impl.h

Issue 2811183003: Change Cronet's "disable_ipv6" to "disable_ipv6_on_wifi" (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 side-by-side diff with in-line comments
Download patch
Index: net/dns/host_resolver_impl.h
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 24062d91ae015c5407b69b06a731ea5646a6b62f..7be2a80cc9571d6e5795a5905d14a23c1fc89963 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -161,6 +161,9 @@ class NET_EXPORT HostResolverImpl
void SetDefaultAddressFamily(AddressFamily address_family) override;
AddressFamily GetDefaultAddressFamily() const override;
+ void SetNoIPv6OnWifi() override;
+ bool GetNoIPv6OnWifi() override;
+
void set_proc_params_for_test(const ProcTaskParams& proc_params) {
proc_params_ = proc_params;
}
@@ -256,7 +259,11 @@ class NET_EXPORT HostResolverImpl
// Probes IPv6 support and returns true if IPv6 support is enabled.
// Results are cached, i.e. when called repeatedly this method returns result
// from the first probe for some time before probing again.
- virtual bool IsIPv6Reachable(const NetLogWithSource& net_log);
+ bool IsIPv6Reachable(const NetLogWithSource& net_log);
+
+ // Attempts to connect a UDP socket to |dest|:53. Virtual for testing.
+ virtual bool IsGloballyReachable(const IPAddress& dest,
+ const NetLogWithSource& net_log);
// Asynchronously checks if only loopback IPs are available.
virtual void RunLoopbackProbeJob();
@@ -353,6 +360,13 @@ class NET_EXPORT HostResolverImpl
// http://crbug.com/696569 for why the option is needed.
AddressFamily default_address_family_;
+ // True if IPv6 should not be attempted when on a wifi connection. See
pauljensen 2017/04/12 18:16:40 nit: wifi->WiFi
mgersh 2017/04/12 18:26:42 Done.
+ // http://crbug.com/696569 for further context.
pauljensen 2017/04/12 18:16:40 nit: http->https
mgersh 2017/04/12 18:26:42 Done.
+ bool assume_ipv6_failure_on_wifi_;
+
+ // Cache current connection type for easier testing.
+ NetworkChangeNotifier::ConnectionType current_connection_type_;
pauljensen 2017/04/12 18:16:40 Can we remove this? Caches are tricky and it does
mgersh 2017/04/12 18:26:42 It's actually used for testing. If I do it this wa
pauljensen 2017/04/12 18:58:11 How about net::test::MockNetworkChangeNotifier (ht
mgersh 2017/04/13 14:57:10 Done.
+
// True if DnsConfigService detected that system configuration depends on
// local IPv6 connectivity. Disables probing.
bool use_local_ipv6_;

Powered by Google App Engine
This is Rietveld 408576698