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

Unified Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 14027007: Add sanity check for deprecated component extension IME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revises comments Created 7 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/input_method/input_method_manager_impl.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
index 0aab684ef53c7f1d90e98c8f8b29ab7a740011fc..e402d12d652ab21d38601ffd6b66e7904f5a5326 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -348,11 +348,22 @@ void InputMethodManagerImpl::OnComponentExtensionInitialized(
void InputMethodManagerImpl::LoadNecessaryComponentExtensions() {
if (!component_extension_ime_manager_->IsInitialized())
return;
- for (size_t i = 0; i < active_input_method_ids_.size(); ++i) {
- if (component_extension_ime_manager_->IsWhitelisted(
- active_input_method_ids_[i])) {
+ // We have to do sanity check here, because some component extension IMEs may
satorux1 2013/04/15 08:31:32 sanity check may be unclear. What about: Load com
Seigo Nonaka 2013/04/16 07:17:03 Sure thanks! Done.
+ // be removed. So if specified component extension IME is no longer existing,
satorux1 2013/04/15 08:31:32 may be removed -> might have been removed from the
Seigo Nonaka 2013/04/16 07:17:03 Done.
+ // falling back to existing IME.
satorux1 2013/04/15 08:31:32 fall back to an existing IME.
Seigo Nonaka 2013/04/16 07:17:03 Done.
+ std::vector<std::string> unfiltered_input_method_ids =
+ active_input_method_ids_;
+ active_input_method_ids_.clear();
+ for (size_t i = 0; i < unfiltered_input_method_ids.size(); ++i) {
+ if (!component_extension_ime_manager_->IsComponentExtensionIMEId(
+ unfiltered_input_method_ids[i])) {
+ // Legacy IMEs or xkb layouts are active alwayes.
satorux1 2013/04/15 08:31:32 always active
Seigo Nonaka 2013/04/16 07:17:03 Done.
+ active_input_method_ids_.push_back(unfiltered_input_method_ids[i]);
+ } else if (component_extension_ime_manager_->IsWhitelisted(
+ unfiltered_input_method_ids[i])) {
component_extension_ime_manager_->LoadComponentExtensionIME(
- active_input_method_ids_[i]);
+ unfiltered_input_method_ids[i]);
+ active_input_method_ids_.push_back(unfiltered_input_method_ids[i]);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698