Commit 39d09da9 authored by byungchul's avatar byungchul Committed by Commit bot

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}
parent 15d265ad
...@@ -105,6 +105,11 @@ void ConnectivityChecker::Check() { ...@@ -105,6 +105,11 @@ void ConnectivityChecker::Check() {
} }
DCHECK(url_request_context_.get()); 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 // If url_request_ is non-null, there is already a check going on. Don't
// start another. // start another.
if (url_request_.get()) if (url_request_.get())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment