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

Unified Diff: chrome/browser/chromeos/net/network_portal_detector_impl.cc

Issue 2394663004: Fix DCHECK in network portal detector. (Closed)
Patch Set: Created 4 years, 2 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: chrome/browser/chromeos/net/network_portal_detector_impl.cc
diff --git a/chrome/browser/chromeos/net/network_portal_detector_impl.cc b/chrome/browser/chromeos/net/network_portal_detector_impl.cc
index e949d7480ce810e46ce5b7dfc19e656a8f91eede..bb99b868bde721fe7ceca78432789adeb3878cb8 100644
--- a/chrome/browser/chromeos/net/network_portal_detector_impl.cc
+++ b/chrome/browser/chromeos/net/network_portal_detector_impl.cc
@@ -549,7 +549,10 @@ void NetworkPortalDetectorImpl::OnAttemptCompleted(
same_detection_result_count_ >= kMaxOfflineResultsBeforeReport) {
OnDetectionCompleted(network, state);
}
- ScheduleAttempt(results.retry_after_delta);
+
+ // Observers (via OnDetectionCompleted) may already schedule new attempt.
+ if (is_idle())
+ ScheduleAttempt(results.retry_after_delta);
}
void NetworkPortalDetectorImpl::Observe(
« 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