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

Side by Side Diff: chrome/browser/chromeos/net/network_portal_detector_impl.cc

Issue 2416763002: Replace FOR_EACH_OBSERVER in c/b/chromeos with range-based for (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 592 }
593 593
594 portal_state_map_[network->guid()] = state; 594 portal_state_map_[network->guid()] = state;
595 } 595 }
596 NotifyDetectionCompleted(network, state); 596 NotifyDetectionCompleted(network, state);
597 } 597 }
598 598
599 void NetworkPortalDetectorImpl::NotifyDetectionCompleted( 599 void NetworkPortalDetectorImpl::NotifyDetectionCompleted(
600 const NetworkState* network, 600 const NetworkState* network,
601 const CaptivePortalState& state) { 601 const CaptivePortalState& state) {
602 FOR_EACH_OBSERVER( 602 for (auto& observer : observers_)
603 Observer, observers_, OnPortalDetectionCompleted(network, state)); 603 observer.OnPortalDetectionCompleted(network, state);
604 } 604 }
605 605
606 bool NetworkPortalDetectorImpl::AttemptTimeoutIsCancelledForTesting() const { 606 bool NetworkPortalDetectorImpl::AttemptTimeoutIsCancelledForTesting() const {
607 return attempt_timeout_.IsCancelled(); 607 return attempt_timeout_.IsCancelled();
608 } 608 }
609 609
610 void NetworkPortalDetectorImpl::RecordDetectionStats( 610 void NetworkPortalDetectorImpl::RecordDetectionStats(
611 const NetworkState* network, 611 const NetworkState* network,
612 CaptivePortalStatus status) { 612 CaptivePortalStatus status) {
613 // Don't record stats for offline state. 613 // Don't record stats for offline state.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 645 }
646 646
647 void NetworkPortalDetectorImpl::ResetStrategyAndCounters() { 647 void NetworkPortalDetectorImpl::ResetStrategyAndCounters() {
648 last_detection_result_ = CAPTIVE_PORTAL_STATUS_UNKNOWN; 648 last_detection_result_ = CAPTIVE_PORTAL_STATUS_UNKNOWN;
649 same_detection_result_count_ = 0; 649 same_detection_result_count_ = 0;
650 no_response_result_count_ = 0; 650 no_response_result_count_ = 0;
651 strategy_->Reset(); 651 strategy_->Reset();
652 } 652 }
653 653
654 } // namespace chromeos 654 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/mobile/mobile_activator.cc ('k') | chrome/browser/chromeos/net/network_portal_detector_test_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698