| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 l10n_util::GetStringUTF16( | 43 l10n_util::GetStringUTF16( |
| 44 language_prefs::kPinyinDoublePinyinSchema.label_message_id)); | 44 language_prefs::kPinyinDoublePinyinSchema.label_message_id)); |
| 45 ListValue* list_value = new ListValue(); | 45 ListValue* list_value = new ListValue(); |
| 46 for (size_t i = 0; | 46 for (size_t i = 0; |
| 47 i < language_prefs::LanguageMultipleChoicePreference<int>::kMaxItems; | 47 i < language_prefs::LanguageMultipleChoicePreference<int>::kMaxItems; |
| 48 ++i) { | 48 ++i) { |
| 49 if (language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. | 49 if (language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. |
| 50 item_message_id == 0) | 50 item_message_id == 0) |
| 51 break; | 51 break; |
| 52 ListValue* option = new ListValue(); | 52 ListValue* option = new ListValue(); |
| 53 option->Append(Value::CreateIntegerValue( | 53 option->Append(base::NumberValue::New( |
| 54 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. | 54 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. |
| 55 ibus_config_value)); | 55 ibus_config_value)); |
| 56 option->Append(Value::CreateStringValue(l10n_util::GetStringUTF16( | 56 option->Append(base::StringValue::New(l10n_util::GetStringUTF16( |
| 57 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. | 57 language_prefs::kPinyinDoublePinyinSchema.values_and_ids[i]. |
| 58 item_message_id))); | 58 item_message_id))); |
| 59 list_value->Append(option); | 59 list_value->Append(option); |
| 60 } | 60 } |
| 61 localized_strings->Set( | 61 localized_strings->Set( |
| 62 GetTemplateDataPropertyName(language_prefs::kPinyinDoublePinyinSchema, | 62 GetTemplateDataPropertyName(language_prefs::kPinyinDoublePinyinSchema, |
| 63 kI18nPrefix), | 63 kI18nPrefix), |
| 64 list_value); | 64 list_value); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace chromeos | 67 } // namespace chromeos |
| OLD | NEW |