diff options
author | byungchul <byungchul@chromium.org> | 2015-03-25 18:28:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-26 01:29:16 +0000 |
commit | 39d09da9ea1c6dbf3529b4febe4277db104a135f (patch) | |
tree | 447aa13073435121122644cc99ebe7a51af7fa92 /chromecast | |
parent | 15d265ad49498885aba400ff05285642c925845d (diff) | |
download | chromium_src-39d09da9ea1c6dbf3529b4febe4277db104a135f.zip chromium_src-39d09da9ea1c6dbf3529b4febe4277db104a135f.tar.gz chromium_src-39d09da9ea1c6dbf3529b4febe4277db104a135f.tar.bz2 |
Don't check connectivity if network is offline.
Some netifs could be ignored by command line flag, --netifs-to-ignore, and
internet could be accessible via those netifs.
Many testing scripts and developers set this for ethernet link and
use ethernet to get testing results.
BUG=internal b/19593970
Review URL: https://codereview.chromium.org/1037693005
Cr-Commit-Position: refs/heads/master@{#322288}
Diffstat (limited to 'chromecast')
-rw-r--r-- | chromecast/net/connectivity_checker.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chromecast/net/connectivity_checker.cc b/chromecast/net/connectivity_checker.cc index e6e1b40..de30812 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()) + return; + // If url_request_ is non-null, there is already a check going on. Don't // start another. if (url_request_.get()) |