| Index: chrome/browser/extensions/install_tracker.cc
|
| diff --git a/chrome/browser/extensions/install_tracker.cc b/chrome/browser/extensions/install_tracker.cc
|
| index 16d091411502d01c7032821cfd9027870806e6fb..bda36cf8d85e14e2d77b43c3d1f2ca47bf6b00ce 100644
|
| --- a/chrome/browser/extensions/install_tracker.cc
|
| +++ b/chrome/browser/extensions/install_tracker.cc
|
| @@ -83,13 +83,13 @@ void InstallTracker::OnBeginExtensionInstall(
|
| active_installs_.insert(std::make_pair(params.extension_id, install_data));
|
| }
|
|
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_,
|
| - OnBeginExtensionInstall(params));
|
| + for (auto& observer : observers_)
|
| + observer.OnBeginExtensionInstall(params);
|
| }
|
|
|
| void InstallTracker::OnBeginExtensionDownload(const std::string& extension_id) {
|
| - FOR_EACH_OBSERVER(
|
| - InstallObserver, observers_, OnBeginExtensionDownload(extension_id));
|
| + for (auto& observer : observers_)
|
| + observer.OnBeginExtensionDownload(extension_id);
|
| }
|
|
|
| void InstallTracker::OnDownloadProgress(const std::string& extension_id,
|
| @@ -102,30 +102,31 @@ void InstallTracker::OnDownloadProgress(const std::string& extension_id,
|
| NOTREACHED();
|
| }
|
|
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_,
|
| - OnDownloadProgress(extension_id, percent_downloaded));
|
| + for (auto& observer : observers_)
|
| + observer.OnDownloadProgress(extension_id, percent_downloaded);
|
| }
|
|
|
| void InstallTracker::OnBeginCrxInstall(const std::string& extension_id) {
|
| - FOR_EACH_OBSERVER(
|
| - InstallObserver, observers_, OnBeginCrxInstall(extension_id));
|
| + for (auto& observer : observers_)
|
| + observer.OnBeginCrxInstall(extension_id);
|
| }
|
|
|
| void InstallTracker::OnFinishCrxInstall(const std::string& extension_id,
|
| bool success) {
|
| - FOR_EACH_OBSERVER(
|
| - InstallObserver, observers_, OnFinishCrxInstall(extension_id, success));
|
| + for (auto& observer : observers_)
|
| + observer.OnFinishCrxInstall(extension_id, success);
|
| }
|
|
|
| void InstallTracker::OnInstallFailure(
|
| const std::string& extension_id) {
|
| RemoveActiveInstall(extension_id);
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_,
|
| - OnInstallFailure(extension_id));
|
| + for (auto& observer : observers_)
|
| + observer.OnInstallFailure(extension_id);
|
| }
|
|
|
| void InstallTracker::Shutdown() {
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_, OnShutdown());
|
| + for (auto& observer : observers_)
|
| + observer.OnShutdown();
|
| }
|
|
|
| void InstallTracker::Observe(int type,
|
| @@ -135,12 +136,13 @@ void InstallTracker::Observe(int type,
|
| case extensions::NOTIFICATION_EXTENSION_UPDATE_DISABLED: {
|
| const Extension* extension =
|
| content::Details<const Extension>(details).ptr();
|
| - FOR_EACH_OBSERVER(
|
| - InstallObserver, observers_, OnDisabledExtensionUpdated(extension));
|
| + for (auto& observer : observers_)
|
| + observer.OnDisabledExtensionUpdated(extension);
|
| break;
|
| }
|
| case chrome::NOTIFICATION_APP_LAUNCHER_REORDERED: {
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered());
|
| + for (auto& observer : observers_)
|
| + observer.OnAppsReordered();
|
| break;
|
| }
|
| default:
|
| @@ -156,7 +158,8 @@ void InstallTracker::OnExtensionInstalled(
|
| }
|
|
|
| void InstallTracker::OnAppsReordered() {
|
| - FOR_EACH_OBSERVER(InstallObserver, observers_, OnAppsReordered());
|
| + for (auto& observer : observers_)
|
| + observer.OnAppsReordered();
|
| }
|
|
|
| } // namespace extensions
|
|
|