Chromium Code Reviews| Index: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| index 65b1191c77aedb6594c7f0cc385df7bb182ce3eb..33b74f7fe2d5f671f4f454113b8669158e7594ff 100644 |
| --- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| +++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
| @@ -68,6 +68,7 @@ |
| #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
| +#include "chrome/browser/chromeos/set_time_dialog.h" |
| #include "chrome/browser/chromeos/settings/cros_settings.h" |
| #include "chrome/browser/chromeos/sim_dialog_delegate.h" |
| #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h" |
| @@ -482,11 +483,17 @@ bool SystemTrayDelegateChromeOS::ShouldShowSettings() { |
| void SystemTrayDelegateChromeOS::ShowDateSettings() { |
| content::RecordAction(base::UserMetricsAction("ShowDateOptions")); |
| - std::string sub_page = |
| - std::string(chrome::kSearchSubPage) + "#" + |
| - l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| + |
| // Everybody can change the time zone (even though it is a device setting). |
| - ShowSettingsSubPageForActiveUser(sub_page); |
| + if (GetUserLoginStatus() == ash::user::LOGGED_IN_LOCKED || |
| + GetUserLoginStatus() == ash::user::LOGGED_IN_NONE) { |
|
stevenjb
2014/04/23 21:32:04
nit: Only call GetUserLoginStatus() once.
michaelpg
2014/04/24 01:32:23
Done.
|
| + SetTimeDialog::ShowDialog(GetNativeWindow()); |
|
stevenjb
2014/04/23 21:32:04
Early exit
michaelpg
2014/04/24 01:32:23
Done.
|
| + } else { |
| + std::string sub_page = |
| + std::string(chrome::kSearchSubPage) + "#" + |
| + l10n_util::GetStringUTF8(IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME); |
| + ShowSettingsSubPageForActiveUser(sub_page); |
| + } |
| } |
| void SystemTrayDelegateChromeOS::ShowNetworkSettings( |