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

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

Issue 2387783002: Remove stl_util's deletion functions from chromeos/. (Closed)
Patch Set: fix Created 4 years, 3 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') | no next file with comments »
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..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;
« no previous file with comments | « no previous file | chromeos/dbus/fake_shill_profile_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698