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

Unified Diff: net/socket/tcp_client_socket_libevent.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/socket/tcp_client_socket_libevent.cc
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index 9b47249a355cd41710e5c16fb9a64b0953b95814..9ad7bed80e8f341e531992ec5aa95b6b49be70f3 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -108,7 +108,8 @@ int MapConnectError(int os_error) {
// Give a more specific error when the user is offline.
if (net_error == ERR_ADDRESS_UNREACHABLE &&
- NetworkChangeNotifier::IsOffline()) {
+ NetworkChangeNotifier::GetConnectionState() ==
+ NetworkChangeNotifier::NONE) {
return ERR_INTERNET_DISCONNECTED;
}
return net_error;

Powered by Google App Engine
This is Rietveld 408576698