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

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login/wizard_controller.h" 5 #include "chrome/browser/chromeos/login/wizard_controller.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 613
614 void WizardController::AddObserver(Observer* observer) { 614 void WizardController::AddObserver(Observer* observer) {
615 observer_list_.AddObserver(observer); 615 observer_list_.AddObserver(observer);
616 } 616 }
617 617
618 void WizardController::RemoveObserver(Observer* observer) { 618 void WizardController::RemoveObserver(Observer* observer) {
619 observer_list_.RemoveObserver(observer); 619 observer_list_.RemoveObserver(observer);
620 } 620 }
621 621
622 void WizardController::OnSessionStart() { 622 void WizardController::OnSessionStart() {
623 FOR_EACH_OBSERVER(Observer, observer_list_, OnSessionStart()); 623 for (auto& observer : observer_list_)
624 observer.OnSessionStart();
624 } 625 }
625 626
626 void WizardController::SkipUpdateEnrollAfterEula() { 627 void WizardController::SkipUpdateEnrollAfterEula() {
627 skip_update_enroll_after_eula_ = true; 628 skip_update_enroll_after_eula_ = true;
628 } 629 }
629 630
630 /////////////////////////////////////////////////////////////////////////////// 631 ///////////////////////////////////////////////////////////////////////////////
631 // WizardController, ExitHandlers: 632 // WizardController, ExitHandlers:
632 void WizardController::OnHIDDetectionCompleted() { 633 void WizardController::OnHIDDetectionCompleted() {
633 // Check for tests configuration. 634 // Check for tests configuration.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 // flow has been switched to sign in screen (ExistingUserController). 911 // flow has been switched to sign in screen (ExistingUserController).
911 if (!oobe_ui_) 912 if (!oobe_ui_)
912 return; 913 return;
913 914
914 // First remember how far have we reached so that we can resume if needed. 915 // First remember how far have we reached so that we can resume if needed.
915 if (is_out_of_box_ && IsResumableScreen(current_screen_->GetName())) 916 if (is_out_of_box_ && IsResumableScreen(current_screen_->GetName()))
916 StartupUtils::SaveOobePendingScreen(current_screen_->GetName()); 917 StartupUtils::SaveOobePendingScreen(current_screen_->GetName());
917 918
918 smooth_show_timer_.Stop(); 919 smooth_show_timer_.Stop();
919 920
920 FOR_EACH_OBSERVER(Observer, observer_list_, OnScreenChanged(current_screen_)); 921 for (auto& observer : observer_list_)
922 observer.OnScreenChanged(current_screen_);
921 923
922 current_screen_->Show(); 924 current_screen_->Show();
923 } 925 }
924 926
925 void WizardController::SetCurrentScreenSmooth(BaseScreen* new_current, 927 void WizardController::SetCurrentScreenSmooth(BaseScreen* new_current,
926 bool use_smoothing) { 928 bool use_smoothing) {
927 if (current_screen_ == new_current || new_current == nullptr || 929 if (current_screen_ == new_current || new_current == nullptr ||
928 oobe_ui_ == nullptr) { 930 oobe_ui_ == nullptr) {
929 return; 931 return;
930 } 932 }
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1451 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1450 } 1452 }
1451 1453
1452 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1454 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1453 screen->SetParameters(effective_config, shark_controller_.get()); 1455 screen->SetParameters(effective_config, shark_controller_.get());
1454 SetStatusAreaVisible(true); 1456 SetStatusAreaVisible(true);
1455 SetCurrentScreen(screen); 1457 SetCurrentScreen(screen);
1456 } 1458 }
1457 1459
1458 } // namespace chromeos 1460 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc ('k') | chrome/browser/chromeos/mobile/mobile_activator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698