Chromium Code Reviews| 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..9c3856dcbfd2745a20450e04aafc747f789d02e2 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 = |
| + auto& timezones = |
|
Daniel Erat
2016/09/30 22:38:04
can this remain const?
Avi (use Gerrit)
2016/10/01 21:51:05
Hmmm. Probably.
|
| 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; |