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

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: sync Created 8 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 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 d2d9d5dbabad5082f31678efb0c73ab3c97b4e28..59870c12b3bff164c204586533ab5fc8fa5e6f3f 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -740,8 +740,11 @@ class HostResolverImpl::ProcTask
// 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::GetConnectionType() ==
+ NetworkChangeNotifier::CONNECTION_NONE) {
wtc 2012/05/11 01:35:05 Nit: this line doesn't need to be indented.
error = ERR_INTERNET_DISCONNECTED;
+ }
// If this is the first attempt that is finishing later, then record data
// for the first attempt. Won't contaminate with retry attempt's data.

Powered by Google App Engine
This is Rietveld 408576698