| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 void UnobserveDriveUpdates() { | 901 void UnobserveDriveUpdates() { |
| 902 DriveIntegrationService* integration_service = | 902 DriveIntegrationService* integration_service = |
| 903 FindDriveIntegrationService(); | 903 FindDriveIntegrationService(); |
| 904 if (integration_service) | 904 if (integration_service) |
| 905 integration_service->job_list()->RemoveObserver(this); | 905 integration_service->job_list()->RemoveObserver(this); |
| 906 } | 906 } |
| 907 | 907 |
| 908 bool ShouldUse24HourClock() const { | 908 bool ShouldUse24HourClock() const { |
| 909 // On login screen and in guest mode owner default is used for | 909 // On login screen and in guest mode owner default is used for |
| 910 // kUse24HourClock preference. | 910 // kUse24HourClock preference. |
| 911 // All other modes default to the default locale value. | |
| 912 const ash::user::LoginStatus status = GetUserLoginStatus(); | 911 const ash::user::LoginStatus status = GetUserLoginStatus(); |
| 913 const CrosSettings* const cros_settings = CrosSettings::Get(); | 912 const CrosSettings* const cros_settings = CrosSettings::Get(); |
| 914 bool system_use_24_hour_clock = true; | 913 bool system_use_24_hour_clock = true; |
| 915 const bool system_value_found = cros_settings->GetBoolean( | 914 const bool system_value_found = cros_settings->GetBoolean( |
| 916 kSystemUse24HourClock, &system_use_24_hour_clock); | 915 kSystemUse24HourClock, &system_use_24_hour_clock); |
| 917 | 916 |
| 918 if (status == ash::user::LOGGED_IN_NONE) | 917 if (status == ash::user::LOGGED_IN_NONE) |
| 919 return (system_value_found ? system_use_24_hour_clock : true); | 918 return (system_value_found ? system_use_24_hour_clock : true); |
| 920 | 919 |
| 921 const PrefService::Preference* user_pref = | 920 const PrefService::Preference* user_pref = |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1226 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1228 }; | 1227 }; |
| 1229 | 1228 |
| 1230 } // namespace | 1229 } // namespace |
| 1231 | 1230 |
| 1232 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1231 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1233 return new chromeos::SystemTrayDelegate(); | 1232 return new chromeos::SystemTrayDelegate(); |
| 1234 } | 1233 } |
| 1235 | 1234 |
| 1236 } // namespace chromeos | 1235 } // namespace chromeos |
| OLD | NEW |