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

Unified Diff: chromecast/net/connectivity_checker.cc

Issue 1037693005: Don't check connectivity if network is offline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/net/connectivity_checker.cc
diff --git a/chromecast/net/connectivity_checker.cc b/chromecast/net/connectivity_checker.cc
index e6e1b409867f5ee374d2cbc1fba68a3a60ad5b0d..de3081291f3e2e71b2b25757b05af569871d756f 100644
--- a/chromecast/net/connectivity_checker.cc
+++ b/chromecast/net/connectivity_checker.cc
@@ -105,6 +105,11 @@ void ConnectivityChecker::Check() {
}
DCHECK(url_request_context_.get());
+ // Don't check connectivity if network is offline, because internet could be
+ // accessible via netifs ignored.
+ if (net::NetworkChangeNotifier::IsOffline())
derekjchow1 2015/03/25 22:37:26 I don't think we should check here. What happens f
byungchul 2015/03/25 22:44:39 SetConnectivity(false) is called by OnConnectionTy
+ return;
+
// If url_request_ is non-null, there is already a check going on. Don't
// start another.
if (url_request_.get())
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698