Index: chrome/browser/chromeos/system/timezone_util.cc |
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc |
index be305fa9168b16c1690a27d25be7e1aa99cbdc34..36019f42174ba5af7fa791559d6eb54b7a558056 100644 |
--- a/chrome/browser/chromeos/system/timezone_util.cc |
+++ b/chrome/browser/chromeos/system/timezone_util.cc |
@@ -146,16 +146,14 @@ namespace system { |
// Creates a list of pairs of each timezone's ID and name. |
std::unique_ptr<base::ListValue> GetTimezoneList() { |
- const std::vector<icu::TimeZone*> &timezones = |
+ const auto& timezones = |
chromeos::system::TimezoneSettings::GetInstance()->GetTimezoneList(); |
std::unique_ptr<base::ListValue> timezoneList(new base::ListValue()); |
- for (std::vector<icu::TimeZone*>::const_iterator iter = timezones.begin(); |
- iter != timezones.end(); ++iter) { |
- const icu::TimeZone* timezone = *iter; |
+ for (const auto& timezone : timezones) { |
base::ListValue* option = new base::ListValue(); |
option->Append(new base::StringValue( |
- chromeos::system::TimezoneSettings::GetTimezoneID(*timezone))); |
- option->Append(new base::StringValue(GetTimezoneName(*timezone))); |
+ chromeos::system::TimezoneSettings::GetTimezoneID(*timezone.get()))); |
+ option->Append(new base::StringValue(GetTimezoneName(*timezone.get()))); |
timezoneList->Append(option); |
} |
return timezoneList; |