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

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

Issue 11415226: webui/options: Do not use Value::CreateStringValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo 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/language_pinyin_handler.h" 5 #include "chrome/browser/ui/webui/options/chromeos/language_pinyin_handler.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/chromeos/language_preferences.h" 8 #include "chrome/browser/chromeos/language_preferences.h"
9 #include "chrome/browser/ui/webui/options/chromeos/language_options_util.h" 9 #include "chrome/browser/ui/webui/options/chromeos/language_options_util.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 l10n_util::GetStringUTF16( 44 l10n_util::GetStringUTF16(
45 language_prefs::kPinyinDoublePinyinSchema.label_message_id)); 45 language_prefs::kPinyinDoublePinyinSchema.label_message_id));
46 ListValue* list_value = new ListValue(); 46 ListValue* list_value = new ListValue();
47 for (size_t i = 0; 47 for (size_t i = 0;
48 i < language_prefs::LanguageMultipleChoicePreference<int>::kMaxItems; 48 i < language_prefs::LanguageMultipleChoicePreference<int>::kMaxItems;
49 ++i) { 49 ++i) {
50 if (language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. 50 if (language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i].
51 item_message_id == 0) 51 item_message_id == 0)
52 break; 52 break;
53 ListValue* option = new ListValue(); 53 ListValue* option = new ListValue();
54 option->Append(Value::CreateIntegerValue( 54 option->Append(new base::FundamentalValue(
55 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. 55 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i].
56 ibus_config_value)); 56 ibus_config_value));
57 option->Append(Value::CreateStringValue(l10n_util::GetStringUTF16( 57 option->Append(new base::StringValue(l10n_util::GetStringUTF16(
58 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. 58 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i].
59 item_message_id))); 59 item_message_id)));
60 list_value->Append(option); 60 list_value->Append(option);
61 } 61 }
62 localized_strings->Set( 62 localized_strings->Set(
63 GetTemplateDataPropertyName(language_prefs::kPinyinDoublePinyinSchema, 63 GetTemplateDataPropertyName(language_prefs::kPinyinDoublePinyinSchema,
64 kI18nPrefix), 64 kI18nPrefix),
65 list_value); 65 list_value);
66 } 66 }
67 67
68 } // namespace options 68 } // namespace options
69 } // namespace chromeos 69 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698