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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2416633002: Remove FOR_EACH_OBSERVER from arc/ since it's being deprecated (Closed)
Patch Set: remove braces 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
Index: chrome/browser/chromeos/arc/arc_auth_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc
index 444063776658e23c5591542f6f87e3dd17b014af..3217516267d5b94ef8ebb435c166b0368abd90cc 100644
--- a/chrome/browser/chromeos/arc/arc_auth_service.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_service.cc
@@ -357,7 +357,8 @@ void ArcAuthService::OnSignInComplete() {
UpdateProvisioningResultUMA(ProvisioningResult::SUCCESS,
IsAccountManaged(profile_));
- FOR_EACH_OBSERVER(Observer, observer_list_, OnInitialStart());
+ for (auto& observer : observer_list_)
+ observer.OnInitialStart();
}
void ArcAuthService::OnSignInFailed(arc::mojom::ArcSignInFailureReason reason) {
@@ -443,7 +444,8 @@ void ArcAuthService::SetState(State state) {
return;
state_ = state;
- FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInChanged(state_));
+ for (auto& observer : observer_list_)
+ observer.OnOptInChanged(state_);
}
bool ArcAuthService::IsAllowed() const {
@@ -596,7 +598,8 @@ void ArcAuthService::OnOptInPreferenceChanged() {
OnSyncedPrefChanged(prefs::kArcEnabled, IsArcManaged());
const bool arc_enabled = IsArcEnabled();
- FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInEnabled(arc_enabled));
+ for (auto& observer : observer_list_)
+ observer.OnOptInEnabled(arc_enabled);
if (!arc_enabled) {
StopArc();
@@ -636,7 +639,8 @@ void ArcAuthService::ShutdownBridge() {
arc_bridge_service()->Shutdown();
if (state_ != State::NOT_INITIALIZED)
SetState(State::STOPPED);
- FOR_EACH_OBSERVER(Observer, observer_list_, OnShutdownBridge());
+ for (auto& observer : observer_list_)
+ observer.OnShutdownBridge();
}
void ArcAuthService::ShutdownBridgeAndCloseUI() {
@@ -663,7 +667,8 @@ void ArcAuthService::RemoveObserver(Observer* observer) {
void ArcAuthService::CloseUI() {
ui_page_ = UIPage::NO_PAGE;
ui_page_status_.clear();
- FOR_EACH_OBSERVER(Observer, observer_list_, OnOptInUIClose());
+ for (auto& observer : observer_list_)
+ observer.OnOptInUIClose();
if (!g_disable_ui_for_testing)
ArcAuthNotification::Hide();
}
@@ -671,8 +676,8 @@ void ArcAuthService::CloseUI() {
void ArcAuthService::SetUIPage(UIPage page, const base::string16& status) {
ui_page_ = page;
ui_page_status_ = status;
- FOR_EACH_OBSERVER(Observer, observer_list_,
- OnOptInUIShowPage(ui_page_, ui_page_status_));
+ for (auto& observer : observer_list_)
+ observer.OnOptInUIShowPage(ui_page_, ui_page_status_);
}
// This is the special method to support enterprise mojo API.
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc » ('j') | components/arc/arc_bridge_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698