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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/camera_presence_notifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
index ac4dfc442d4330b55a9f95b1f35d83fb5e724be8..dad53f4a786f099bf2f112838ff91574c2f491b2 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -577,14 +577,13 @@ void KioskAppManager::UpdateExternalCache() {
}
void KioskAppManager::OnKioskAppCacheUpdated(const std::string& app_id) {
- FOR_EACH_OBSERVER(
- KioskAppManagerObserver, observers_, OnKioskAppCacheUpdated(app_id));
+ for (auto& observer : observers_)
+ observer.OnKioskAppCacheUpdated(app_id);
}
void KioskAppManager::OnKioskAppExternalUpdateComplete(bool success) {
- FOR_EACH_OBSERVER(KioskAppManagerObserver,
- observers_,
- OnKioskAppExternalUpdateComplete(success));
+ for (auto& observer : observers_)
+ observer.OnKioskAppExternalUpdateComplete(success);
}
void KioskAppManager::PutValidatedExternalExtension(
@@ -743,8 +742,8 @@ void KioskAppManager::UpdateAppData() {
UpdateExternalCachePrefs();
RetryFailedAppDataFetch();
- FOR_EACH_OBSERVER(KioskAppManagerObserver, observers_,
- OnKioskAppsSettingsChanged());
+ for (auto& observer : observers_)
+ observer.OnKioskAppsSettingsChanged();
}
void KioskAppManager::ClearRemovedApps(
@@ -804,15 +803,13 @@ void KioskAppManager::GetKioskAppIconCacheDir(base::FilePath* cache_dir) {
}
void KioskAppManager::OnKioskAppDataChanged(const std::string& app_id) {
- FOR_EACH_OBSERVER(KioskAppManagerObserver,
- observers_,
- OnKioskAppDataChanged(app_id));
+ for (auto& observer : observers_)
+ observer.OnKioskAppDataChanged(app_id);
}
void KioskAppManager::OnKioskAppDataLoadFailure(const std::string& app_id) {
- FOR_EACH_OBSERVER(KioskAppManagerObserver,
- observers_,
- OnKioskAppDataLoadFailure(app_id));
+ for (auto& observer : observers_)
+ observer.OnKioskAppDataLoadFailure(app_id);
}
void KioskAppManager::OnExtensionListsUpdated(
@@ -829,10 +826,8 @@ void KioskAppManager::OnExtensionLoadedInCache(const std::string& id) {
if (GetCachedCrx(id, &crx_path, &version))
app_data->SetCachedCrx(crx_path);
- FOR_EACH_OBSERVER(KioskAppManagerObserver,
- observers_,
- OnKioskExtensionLoadedInCache(id));
-
+ for (auto& observer : observers_)
+ observer.OnKioskExtensionLoadedInCache(id);
}
void KioskAppManager::OnExtensionDownloadFailed(
@@ -841,9 +836,8 @@ void KioskAppManager::OnExtensionDownloadFailed(
KioskAppData* app_data = GetAppDataMutable(id);
if (!app_data)
return;
- FOR_EACH_OBSERVER(KioskAppManagerObserver,
- observers_,
- OnKioskExtensionDownloadFailed(id));
+ for (auto& observer : observers_)
+ observer.OnKioskExtensionDownloadFailed(id);
}
KioskAppManager::AutoLoginState KioskAppManager::GetAutoLoginState() const {
« no previous file with comments | « no previous file | chrome/browser/chromeos/camera_presence_notifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698