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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/language_options_util.h

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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 break; 64 break;
65 ++list_length; 65 ++list_length;
66 } 66 }
67 DCHECK_GT(list_length, 0); 67 DCHECK_GT(list_length, 0);
68 68
69 base::ListValue* list_value = new base::ListValue(); 69 base::ListValue* list_value = new base::ListValue();
70 for (int i = 0; i < list_length; ++i) { 70 for (int i = 0; i < list_length; ++i) {
71 base::ListValue* option = new base::ListValue(); 71 base::ListValue* option = new base::ListValue();
72 option->Append(CreateValue( 72 option->Append(CreateValue(
73 preference.values_and_ids[i].ibus_config_value)); 73 preference.values_and_ids[i].ibus_config_value));
74 option->Append(base::Value::CreateStringValue(l10n_util::GetStringUTF16( 74 option->Append(new base::StringValue(l10n_util::GetStringUTF16(
75 preference.values_and_ids[i].item_message_id))); 75 preference.values_and_ids[i].item_message_id)));
76 list_value->Append(option); 76 list_value->Append(option);
77 } 77 }
78 return list_value; 78 return list_value;
79 } 79 }
80 80
81 } // namespace options 81 } // namespace options
82 } // namespace chromeos 82 } // namespace chromeos
83 83
84 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_ 84 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_LANGUAGE_OPTIONS_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698