| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/preferences.h" | 5 #include "chrome/browser/chromeos/preferences.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/autoclick/autoclick_controller.h" | 9 #include "ash/autoclick/autoclick_controller.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 const char* name, | 620 const char* name, |
| 621 const std::string& value) { | 621 const std::string& value) { |
| 622 VLOG(1) << "Setting " << name << " to '" << value << "'"; | 622 VLOG(1) << "Setting " << name << " to '" << value << "'"; |
| 623 | 623 |
| 624 std::vector<std::string> split_values; | 624 std::vector<std::string> split_values; |
| 625 if (!value.empty()) | 625 if (!value.empty()) |
| 626 base::SplitString(value, ',', &split_values); | 626 base::SplitString(value, ',', &split_values); |
| 627 | 627 |
| 628 // Transfers the xkb id to extension-xkb id. | 628 // Transfers the xkb id to extension-xkb id. |
| 629 if (input_method_manager_->MigrateInputMethods(&split_values)) | 629 if (input_method_manager_->MigrateInputMethods(&split_values)) |
| 630 preload_engines_.SetValue(base::JoinString(split_values, ",")); | 630 preload_engines_.SetValue(JoinString(split_values, ',')); |
| 631 | 631 |
| 632 if (section == std::string(language_prefs::kGeneralSectionName) && | 632 if (section == std::string(language_prefs::kGeneralSectionName) && |
| 633 name == std::string(language_prefs::kPreloadEnginesConfigName)) { | 633 name == std::string(language_prefs::kPreloadEnginesConfigName)) { |
| 634 ime_state_->ReplaceEnabledInputMethods(split_values); | 634 ime_state_->ReplaceEnabledInputMethods(split_values); |
| 635 return; | 635 return; |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 | 638 |
| 639 void Preferences::SetInputMethodList() { | 639 void Preferences::SetInputMethodList() { |
| 640 // When |preload_engines_| are set, InputMethodManager::ChangeInputMethod() | 640 // When |preload_engines_| are set, InputMethodManager::ChangeInputMethod() |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 touch_hud_projection_enabled_.SetValue(enabled); | 682 touch_hud_projection_enabled_.SetValue(enabled); |
| 683 } | 683 } |
| 684 | 684 |
| 685 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { | 685 void Preferences::ActiveUserChanged(const user_manager::User* active_user) { |
| 686 if (active_user != user_) | 686 if (active_user != user_) |
| 687 return; | 687 return; |
| 688 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); | 688 ApplyPreferences(REASON_ACTIVE_USER_CHANGED, ""); |
| 689 } | 689 } |
| 690 | 690 |
| 691 } // namespace chromeos | 691 } // namespace chromeos |
| OLD | NEW |