Chromium Code Reviews| Index: chrome/browser/extensions/api/input/input.cc |
| diff --git a/chrome/browser/extensions/api/input/input.cc b/chrome/browser/extensions/api/input/input.cc |
| index 2e2772b08f5308aa932953d2cf6c091efa5c498e..65cc61a6744dd9c183c9e88aa48495a5ad303f23 100644 |
| --- a/chrome/browser/extensions/api/input/input.cc |
| +++ b/chrome/browser/extensions/api/input/input.cc |
| @@ -8,6 +8,8 @@ |
| #include "base/lazy_instance.h" |
| #include "base/metrics/histogram.h" |
| #include "base/strings/string16.h" |
| +#include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| +#include "chrome/browser/chromeos/login/users/user_manager.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| #include "chrome/browser/ui/chrome_pages.h" |
| #include "chrome/common/url_constants.h" |
| @@ -168,6 +170,13 @@ bool VirtualKeyboardPrivateGetKeyboardConfigFunction::RunSync() { |
| bool VirtualKeyboardPrivateOpenSettingsFunction::RunSync() { |
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| #if defined(USE_ASH) |
| + // Do not try to open language options page if user is not logged in or |
| + // locked. |
| + if (!chromeos::UserManager::Get()->IsUserLoggedIn() || |
|
Shu Chen
2014/07/23 14:23:19
I think you need to guard this code block in #ifde
bshe
2014/07/24 17:24:16
Done.
|
| + (chromeos::ScreenLocker::default_screen_locker() && |
| + chromeos::ScreenLocker::default_screen_locker()->locked())) |
| + return true; |
| + |
| content::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog")); |
| chrome::ShowSettingsSubPageForProfile( |
| ProfileManager::GetActiveUserProfile(), chrome::kLanguageOptionsSubPage); |