OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 DCHECK(virtual_keyboard_pref); | 582 DCHECK(virtual_keyboard_pref); |
583 | 583 |
584 input_method::InputMethodManager* input_method_manager = | 584 input_method::InputMethodManager* input_method_manager = |
585 input_method::InputMethodManager::GetInstance(); | 585 input_method::InputMethodManager::GetInstance(); |
586 input_method_manager->ClearAllVirtualKeyboardPreferences(); | 586 input_method_manager->ClearAllVirtualKeyboardPreferences(); |
587 | 587 |
588 std::string url; | 588 std::string url; |
589 for (DictionaryValue::key_iterator iter = virtual_keyboard_pref->begin_keys(); | 589 for (DictionaryValue::key_iterator iter = virtual_keyboard_pref->begin_keys(); |
590 iter != virtual_keyboard_pref->end_keys(); | 590 iter != virtual_keyboard_pref->end_keys(); |
591 ++iter) { | 591 ++iter) { |
592 const std::string& input_method_id = *iter; | 592 const std::string& xkb_layout = *iter; |
593 if (!virtual_keyboard_pref->GetString(input_method_id, &url)) | 593 if (!virtual_keyboard_pref->GetString(xkb_layout, &url)) |
594 continue; | 594 continue; |
595 input_method_manager->SetVirtualKeyboardPreference( | 595 input_method_manager->SetVirtualKeyboardPreference(xkb_layout, GURL(url)); |
596 input_method_id, GURL(url)); | |
597 } | 596 } |
598 } | 597 } |
599 | 598 |
600 } // namespace chromeos | 599 } // namespace chromeos |
OLD | NEW |