| Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
|
| diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
|
| index 6c555a6fa53750688036a9901547a151ba08aadb..60cc4935172739259e92106c49a5e4a917a03713 100644
|
| --- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
|
| +++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
|
| @@ -100,7 +100,7 @@ ChromeShellDelegate::~ChromeShellDelegate() {
|
| instance_ = NULL;
|
| }
|
|
|
| -bool ChromeShellDelegate::IsUserLoggedIn() {
|
| +bool ChromeShellDelegate::IsUserLoggedIn() const {
|
| #if defined(OS_CHROMEOS)
|
| // When running a Chrome OS build outside of a device (i.e. on a developer's
|
| // workstation) and not running as login-manager, pretend like we're always
|
| @@ -372,8 +372,16 @@ void ChromeShellDelegate::SetMagnifier(ash::MagnifierType type) {
|
|
|
| bool ChromeShellDelegate::ShouldAlwaysShowAccessibilityMenu() const {
|
| #if defined(OS_CHROMEOS)
|
| - // TODO(yoshiki): Add the checkbox on chrome://settings. crbug.com/158287
|
| - return false;
|
| + if (!IsUserLoggedIn())
|
| + return true;
|
| +
|
| + Profile* profile = ProfileManager::GetDefaultProfile();
|
| + if (!profile)
|
| + return false;
|
| +
|
| + PrefService* user_pref_service = profile->GetPrefs();
|
| + return user_pref_service &&
|
| + user_pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu);
|
| #else
|
| return false;
|
| #endif
|
|
|