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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/timezone_options_util.cc

Issue 11415226: webui/options: Do not use Value::CreateStringValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" 5 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 // Creates a list of pairs of each timezone's ID and name. 126 // Creates a list of pairs of each timezone's ID and name.
127 scoped_ptr<base::ListValue> GetTimezoneList() { 127 scoped_ptr<base::ListValue> GetTimezoneList() {
128 const std::vector<icu::TimeZone*> &timezones = 128 const std::vector<icu::TimeZone*> &timezones =
129 chromeos::system::TimezoneSettings::GetInstance()->GetTimezoneList(); 129 chromeos::system::TimezoneSettings::GetInstance()->GetTimezoneList();
130 scoped_ptr<base::ListValue> timezoneList(new base::ListValue()); 130 scoped_ptr<base::ListValue> timezoneList(new base::ListValue());
131 for (std::vector<icu::TimeZone*>::const_iterator iter = timezones.begin(); 131 for (std::vector<icu::TimeZone*>::const_iterator iter = timezones.begin();
132 iter != timezones.end(); ++iter) { 132 iter != timezones.end(); ++iter) {
133 const icu::TimeZone* timezone = *iter; 133 const icu::TimeZone* timezone = *iter;
134 base::ListValue* option = new base::ListValue(); 134 base::ListValue* option = new base::ListValue();
135 option->Append(Value::CreateStringValue( 135 option->Append(new base::StringValue(
136 chromeos::system::TimezoneSettings::GetTimezoneID(*timezone))); 136 chromeos::system::TimezoneSettings::GetTimezoneID(*timezone)));
137 option->Append(Value::CreateStringValue(GetTimezoneName(*timezone))); 137 option->Append(new base::StringValue(GetTimezoneName(*timezone)));
138 timezoneList->Append(option); 138 timezoneList->Append(option);
139 } 139 }
140 return timezoneList.Pass(); 140 return timezoneList.Pass();
141 } 141 }
142 142
143 } // namespace options 143 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698