Index: chrome/common/extensions/api/input_ime/input_components_handler.cc |
diff --git a/chrome/common/extensions/api/input_ime/input_components_handler.cc b/chrome/common/extensions/api/input_ime/input_components_handler.cc |
index 36da8bb044fb59d3bc21ac8bdd09bb7d9f356b81..fbead8971bbb93e2ac2e081542a0e8a16f069399 100644 |
--- a/chrome/common/extensions/api/input_ime/input_components_handler.cc |
+++ b/chrome/common/extensions/api/input_ime/input_components_handler.cc |
@@ -117,21 +117,17 @@ bool InputComponentsHandler::Parse(Extension* extension, |
// Get input_components[i].layouts. |
const ListValue* layouts_value = NULL; |
- if (!module_value->GetList(keys::kLayouts, &layouts_value)) { |
- *error = ASCIIToUTF16( |
- errors::kInvalidInputComponentLayouts); |
- return false; |
- } |
- |
- for (size_t j = 0; j < layouts_value->GetSize(); ++j) { |
- std::string layout_name_str; |
- if (!layouts_value->GetString(j, &layout_name_str)) { |
- *error = ErrorUtils::FormatErrorMessageUTF16( |
- errors::kInvalidInputComponentLayoutName, |
- base::IntToString(i), base::IntToString(j)); |
- return false; |
+ if (module_value->GetList(keys::kLayouts, &layouts_value)) { |
+ for (size_t j = 0; j < layouts_value->GetSize(); ++j) { |
+ std::string layout_name_str; |
+ if (!layouts_value->GetString(j, &layout_name_str)) { |
+ *error = ErrorUtils::FormatErrorMessageUTF16( |
+ errors::kInvalidInputComponentLayoutName, |
+ base::IntToString(i), base::IntToString(j)); |
+ return false; |
+ } |
+ layouts.insert(layout_name_str); |
} |
- layouts.insert(layout_name_str); |
} |
if (module_value->HasKey(keys::kShortcutKey)) { |