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 27ea957f9d7054eda6300787408748278e5d7642..c848c9b3e61d9c13844e968d166f27c4bb90adfe 100644 |
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc |
@@ -57,6 +57,8 @@ |
#include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
#include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
#include "chrome/browser/chromeos/options/network_config_view.h" |
+#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
+#include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.h" |
#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" |
@@ -1011,8 +1013,12 @@ void SystemTrayDelegateChromeOS::UpdateClockType() { |
GetSystemTrayNotifier()->NotifyDateFormatChanged(); |
// This also works for enterprise-managed devices because they never have |
// local owner. |
- if (user_manager::UserManager::Get()->IsCurrentUserOwner()) |
- CrosSettings::Get()->SetBoolean(kSystemUse24HourClock, use_24_hour_clock); |
+ if (user_manager::UserManager::Get()->IsCurrentUserOwner()) { |
+ Profile* profile = ProfileManager::GetActiveUserProfile(); |
bartfab (slow)
2015/03/31 14:12:42
Nit: const pointer.
|
+ OwnerSettingsServiceChromeOS* service = |
bartfab (slow)
2015/03/31 14:12:41
Nit: const pointer.
|
+ OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(profile); |
+ service->SetBoolean(kSystemUse24HourClock, use_24_hour_clock); |
+ } |
} |
void SystemTrayDelegateChromeOS::UpdateShowLogoutButtonInTray() { |
@@ -1113,8 +1119,10 @@ void SystemTrayDelegateChromeOS::LoggedInStateChanged() { |
// user's profile has actually been loaded (http://crbug.com/317745). The |
// system tray's time format is updated at login via SetProfile(). |
if (user_manager::UserManager::Get()->IsCurrentUserOwner()) { |
- CrosSettings::Get()->SetBoolean(kSystemUse24HourClock, |
- ShouldUse24HourClock()); |
+ Profile* profile = ProfileManager::GetActiveUserProfile(); |
bartfab (slow)
2015/03/31 14:12:41
Nit: const pointer.
|
+ OwnerSettingsServiceChromeOS* service = |
bartfab (slow)
2015/03/31 14:12:41
Nit: const pointer.
|
+ OwnerSettingsServiceChromeOSFactory::GetForBrowserContext(profile); |
+ service->SetBoolean(kSystemUse24HourClock, ShouldUse24HourClock()); |
} |
} |