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

Unified Diff: chromecast/net/connectivity_checker.cc

Issue 960693002: Remove NetworkChangeNotifierCast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « chromecast/chromecast.gyp ('k') | chromecast/net/network_change_notifier_cast.h » ('j') | 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 e64ac47d2f7c7e7fb73d0ea2a25cc06a22cc552b..d33977aa79111bf92d3ef6d265245aa553be6a6a 100644
--- a/chromecast/net/connectivity_checker.cc
+++ b/chromecast/net/connectivity_checker.cc
@@ -69,6 +69,7 @@ void ConnectivityChecker::Initialize() {
ConnectivityChecker::~ConnectivityChecker() {
DCHECK(loop_proxy_.get());
loop_proxy_->DeleteSoon(FROM_HERE, url_request_context_.release());
+ loop_proxy_->DeleteSoon(FROM_HERE, url_request_.release());
}
void ConnectivityChecker::AddConnectivityObserver(
@@ -108,7 +109,7 @@ void ConnectivityChecker::Check() {
if (url_request_.get())
return;
- VLOG(2) << "Connectivity check: url=" << *connectivity_check_url_;
+ VLOG(1) << "Connectivity check: url=" << *connectivity_check_url_;
url_request_ = url_request_context_->CreateRequest(
*connectivity_check_url_, net::MAXIMUM_PRIORITY, this, NULL);
url_request_->set_method("HEAD");
@@ -139,11 +140,13 @@ void ConnectivityChecker::OnResponseStarted(net::URLRequest* request) {
url_request_.reset(NULL); // URLRequest::Cancel() is called in destructor.
if (http_response_code < 400) {
+ VLOG(1) << "Connectivity check succeeded";
bad_responses_ = 0;
SetConnectivity(true);
return;
}
+ VLOG(1) << "Connectivity check failed: " << http_response_code;
++bad_responses_;
if (bad_responses_ > kNumBadResponses) {
bad_responses_ = kNumBadResponses;
« no previous file with comments | « chromecast/chromecast.gyp ('k') | chromecast/net/network_change_notifier_cast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698