| 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 void UnobserveDriveUpdates() { | 952 void UnobserveDriveUpdates() { |
| 953 DriveIntegrationService* integration_service = | 953 DriveIntegrationService* integration_service = |
| 954 FindDriveIntegrationService(); | 954 FindDriveIntegrationService(); |
| 955 if (integration_service) | 955 if (integration_service) |
| 956 integration_service->job_list()->RemoveObserver(this); | 956 integration_service->job_list()->RemoveObserver(this); |
| 957 } | 957 } |
| 958 | 958 |
| 959 bool ShouldUse24HourClock() const { | 959 bool ShouldUse24HourClock() const { |
| 960 // On login screen and in guest mode owner default is used for | 960 // On login screen and in guest mode owner default is used for |
| 961 // kUse24HourClock preference. | 961 // kUse24HourClock preference. |
| 962 // All other modes default to the default locale value. | |
| 963 const ash::user::LoginStatus status = GetUserLoginStatus(); | 962 const ash::user::LoginStatus status = GetUserLoginStatus(); |
| 964 const CrosSettings* const cros_settings = CrosSettings::Get(); | 963 const CrosSettings* const cros_settings = CrosSettings::Get(); |
| 965 bool system_use_24_hour_clock = true; | 964 bool system_use_24_hour_clock = true; |
| 966 const bool system_value_found = cros_settings->GetBoolean( | 965 const bool system_value_found = cros_settings->GetBoolean( |
| 967 kSystemUse24HourClock, &system_use_24_hour_clock); | 966 kSystemUse24HourClock, &system_use_24_hour_clock); |
| 968 | 967 |
| 969 if (status == ash::user::LOGGED_IN_NONE) | 968 if (status == ash::user::LOGGED_IN_NONE) |
| 970 return (system_value_found ? system_use_24_hour_clock : true); | 969 return (system_value_found ? system_use_24_hour_clock : true); |
| 971 | 970 |
| 972 const PrefService::Preference* user_pref = | 971 const PrefService::Preference* user_pref = |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1354 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1356 }; | 1355 }; |
| 1357 | 1356 |
| 1358 } // namespace | 1357 } // namespace |
| 1359 | 1358 |
| 1360 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1359 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1361 return new chromeos::SystemTrayDelegate(); | 1360 return new chromeos::SystemTrayDelegate(); |
| 1362 } | 1361 } |
| 1363 | 1362 |
| 1364 } // namespace chromeos | 1363 } // namespace chromeos |
| OLD | NEW |