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

Unified Diff: net/base/host_resolver_impl.cc

Issue 9147026: API for connection type (Ethernet/WIFI/WWAN ...) in NetworkChangeNotifier. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 217f1e1329e678e0500a337fbc45cf9a33e165e1..cc3efbfceabc75824f368be214fea20aa8d250c1 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -581,7 +581,9 @@ class HostResolverImpl::Job
// Ideally the following code would be part of host_resolver_proc.cc,
// however it isn't safe to call NetworkChangeNotifier from worker
// threads. So we do it here on the IO thread instead.
- if (error != OK && NetworkChangeNotifier::IsOffline())
+ if (error != OK &&
+ NetworkChangeNotifier::GetConnectionState() ==
+ NetworkChangeNotifier::NONE)
error = ERR_INTERNET_DISCONNECTED;
// We will record data for the first attempt. Don't contaminate with retry

Powered by Google App Engine
This is Rietveld 408576698