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

Unified Diff: chrome/browser/chromeos/system/timezone_util.cc

Issue 2387783002: Remove stl_util's deletion functions from chromeos/. (Closed)
Patch Set: const 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 | « no previous file | chromeos/dbus/fake_shill_profile_client.h » ('j') | chromeos/network/policy_applicator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | chromeos/dbus/fake_shill_profile_client.h » ('j') | chromeos/network/policy_applicator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698