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

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

Issue 1136463005: Supports multiple profile in Chrome OS IMF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed test failures. Created 5 years, 7 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
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 32504e4612e0b47d5e32cb729c8b1841ea7992a6..65de63831918e24c010f0d17ee5ef9a485f3aa03 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -445,7 +445,7 @@ void InputMethodManagerImpl::StateImpl::AddInputMethodExtension(
DCHECK(engine);
- manager_->engine_map_[extension_id] = engine;
+ manager_->engine_map_[profile][extension_id] = engine;
bool contain = false;
for (size_t i = 0; i < descriptors.size(); i++) {
@@ -502,10 +502,10 @@ void InputMethodManagerImpl::StateImpl::RemoveInputMethodExtension(
if (IsActive()) {
if (IMEBridge::Get()->GetCurrentEngineHandler() ==
- manager_->engine_map_[extension_id]) {
+ manager_->engine_map_[profile][extension_id]) {
IMEBridge::Get()->SetCurrentEngineHandler(NULL);
}
- manager_->engine_map_.erase(extension_id);
+ manager_->engine_map_[profile].erase(extension_id);
}
// If |current_input_method| is no longer in |active_input_method_ids|,
@@ -1009,7 +1009,7 @@ void InputMethodManagerImpl::ChangeInputMethodInternal(
extension_ime_util::GetExtensionIDFromInputMethodID(descriptor.id());
const std::string& component_id =
extension_ime_util::GetComponentIDByInputMethodID(descriptor.id());
- engine = engine_map_[extension_id];
+ engine = engine_map_[ProfileManager::GetActiveUserProfile()][extension_id];
Shu Chen 2015/05/09 08:31:11 After cl https://codereview.chromium.org/105586300
Alexander Alekseev 2015/05/13 17:50:39 It is landed now.
Shu Chen 2015/05/14 04:53:05 Done.
IMEBridge::Get()->SetCurrentEngineHandler(engine);

Powered by Google App Engine
This is Rietveld 408576698