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

Unified Diff: chromeos/network/network_profile_handler.cc

Issue 2413963002: Replace FOR_EACH_OBSERVER in chromeos/ with range-based for (Closed)
Patch Set: Run the script again with '/mg' 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 | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_sms_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_profile_handler.cc
diff --git a/chromeos/network/network_profile_handler.cc b/chromeos/network/network_profile_handler.cc
index 0d13ee32393a7b01f559f460380453ada6e0c7ef..8b4dc17414fdeda087c8851edab3285274db9311 100644
--- a/chromeos/network/network_profile_handler.cc
+++ b/chromeos/network/network_profile_handler.cc
@@ -156,8 +156,8 @@ void NetworkProfileHandler::GetProfilePropertiesCallback(
void NetworkProfileHandler::AddProfile(const NetworkProfile& profile) {
VLOG(2) << "Adding profile " << profile.ToDebugString() << ".";
profiles_.push_back(profile);
- FOR_EACH_OBSERVER(NetworkProfileObserver, observers_,
- OnProfileAdded(profiles_.back()));
+ for (auto& observer : observers_)
+ observer.OnProfileAdded(profiles_.back());
}
void NetworkProfileHandler::RemoveProfile(const std::string& profile_path) {
@@ -168,8 +168,8 @@ void NetworkProfileHandler::RemoveProfile(const std::string& profile_path) {
return;
NetworkProfile profile = *found;
profiles_.erase(found);
- FOR_EACH_OBSERVER(NetworkProfileObserver, observers_,
- OnProfileRemoved(profile));
+ for (auto& observer : observers_)
+ observer.OnProfileRemoved(profile);
}
const NetworkProfile* NetworkProfileHandler::GetProfileForPath(
« no previous file with comments | « chromeos/network/network_connection_handler.cc ('k') | chromeos/network/network_sms_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698