| Index: chromeos/ime/extension_ime_util.cc
|
| diff --git a/chromeos/ime/extension_ime_util.cc b/chromeos/ime/extension_ime_util.cc
|
| index 474622df28773e9271c9baf3501457eceb6b5ca1..6591a0e9fc7252a02f3505e0c6a07cec8f1cd5d3 100644
|
| --- a/chromeos/ime/extension_ime_util.cc
|
| +++ b/chromeos/ime/extension_ime_util.cc
|
| @@ -110,12 +110,16 @@ bool IsKeyboardLayoutExtension(const std::string& input_method_id) {
|
| return StartsWithASCII(input_method_id, prefix + kXkbExtensionId, true);
|
| }
|
|
|
| +std::string GetEngineIDByInputMethodID(const std::string& input_method_id) {
|
| + if (!IsComponentExtensionIME(input_method_id))
|
| + return input_method_id;
|
| + return input_method_id.substr(kComponentExtensionIMEPrefixLength +
|
| + kExtensionIdLength);
|
| +}
|
| +
|
| std::string MaybeGetLegacyXkbId(const std::string& input_method_id) {
|
| - if (IsKeyboardLayoutExtension(input_method_id)) {
|
| - size_t pos = input_method_id.find("xkb:");
|
| - if (pos != std::string::npos)
|
| - return input_method_id.substr(pos);
|
| - }
|
| + if (IsKeyboardLayoutExtension(input_method_id))
|
| + return GetEngineIDByInputMethodID(input_method_id);
|
| return input_method_id;
|
| }
|
|
|
|
|