diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 23:05:00 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 23:05:00 +0000 |
commit | 05a1ba49bd770a52a3a84aa2ce6241b0e538d7da (patch) | |
tree | c4bfab215e9be18405685e272734aa815834e2ab /chrome | |
parent | d93fc46b802e22d4b55ac871c63045a23e790af4 (diff) | |
download | chromium_src-05a1ba49bd770a52a3a84aa2ce6241b0e538d7da.zip chromium_src-05a1ba49bd770a52a3a84aa2ce6241b0e538d7da.tar.gz chromium_src-05a1ba49bd770a52a3a84aa2ce6241b0e538d7da.tar.bz2 |
Use IsKeyboardLayout() instead of hard coding "xkb:".
This is minor cleanup.
TEST=sceen locker works as before
BUG=none
Review URL: http://codereview.chromium.org/6656022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/chromeos/login/screen_locker.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc index 0e177e5..56e9977 100644 --- a/chrome/browser/chromeos/login/screen_locker.cc +++ b/chrome/browser/chromeos/login/screen_locker.cc @@ -71,9 +71,6 @@ const int64 kRetryGrabIntervalMs = 500; // giving up. If we hit the limit, Chrome exits and the session is terminated. const int kMaxGrabFailures = kMaxGrabFailureSec * 1000 / kRetryGrabIntervalMs; -// Each keyboard layout has a dummy input method ID which starts with "xkb:". -const char kValidInputMethodPrefix[] = "xkb:"; - // A idle time to show the screen saver in seconds. const int kScreenSaverIdleTimeout = 15; @@ -143,9 +140,8 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer, for (size_t i = 0; i < active_input_method_list->size(); ++i) { const std::string& input_method_id = active_input_method_list->at(i).id; saved_active_input_method_list_.push_back(input_method_id); - // |active_input_method_list| contains both input method descriptions - // and keyboard layout descriptions. - if (!StartsWithASCII(input_method_id, kValidInputMethodPrefix, true)) + // Skip if it's not a keyboard layout. + if (!chromeos::input_method::IsKeyboardLayout(input_method_id)) continue; value.string_list_value.push_back(input_method_id); if (input_method_id == hardware_keyboard_id) { |