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

Unified Diff: chromeos/settings/timezone_settings.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_state_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/settings/timezone_settings.cc
diff --git a/chromeos/settings/timezone_settings.cc b/chromeos/settings/timezone_settings.cc
index 0f42e861ab90987b21170db241a38bff30282f8d..38ea65d653ac09e82014bf3bf3d3cd1542203c55 100644
--- a/chromeos/settings/timezone_settings.cc
+++ b/chromeos/settings/timezone_settings.cc
@@ -393,7 +393,8 @@ void TimezoneSettingsImpl::SetTimezone(const icu::TimeZone& timezone) {
base::WorkerPool::GetTaskRunner(true /* task is slow */)->
PostTask(FROM_HERE, base::Bind(&SetTimezoneIDFromString, id));
icu::TimeZone::setDefault(*known_timezone);
- FOR_EACH_OBSERVER(Observer, observers_, TimezoneChanged(*known_timezone));
+ for (auto& observer : observers_)
+ observer.TimezoneChanged(*known_timezone);
}
// static
@@ -440,7 +441,8 @@ void TimezoneSettingsStubImpl::SetTimezone(const icu::TimeZone& timezone) {
VLOG(1) << "Setting timezone to " << id;
timezone_.reset(known_timezone->clone());
icu::TimeZone::setDefault(*known_timezone);
- FOR_EACH_OBSERVER(Observer, observers_, TimezoneChanged(*known_timezone));
+ for (auto& observer : observers_)
+ observer.TimezoneChanged(*known_timezone);
}
// static
« no previous file with comments | « chromeos/network/network_state_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698