| 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/settings/system_settings_provider.h" | 5 #include "chrome/browser/chromeos/settings/system_settings_provider.h" |
| 6 | 6 |
| 7 #include "base/string16.h" | 7 #include "base/string16.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/login/user_manager.h" | 10 #include "chrome/browser/chromeos/login/user_manager.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // The timezone is always trusted. | 53 // The timezone is always trusted. |
| 54 CrosSettingsProvider::TrustedStatus | 54 CrosSettingsProvider::TrustedStatus |
| 55 SystemSettingsProvider::PrepareTrustedValues(const base::Closure& cb) { | 55 SystemSettingsProvider::PrepareTrustedValues(const base::Closure& cb) { |
| 56 return TRUSTED; | 56 return TRUSTED; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool SystemSettingsProvider::HandlesSetting(const std::string& path) const { | 59 bool SystemSettingsProvider::HandlesSetting(const std::string& path) const { |
| 60 return path == kSystemTimezone; | 60 return path == kSystemTimezone; |
| 61 } | 61 } |
| 62 | 62 |
| 63 void SystemSettingsProvider::Reload() { |
| 64 // TODO(pastarmovj): We can actually cache the timezone here to make returning |
| 65 // it faster. |
| 66 } |
| 67 |
| 63 void SystemSettingsProvider::TimezoneChanged(const icu::TimeZone& timezone) { | 68 void SystemSettingsProvider::TimezoneChanged(const icu::TimeZone& timezone) { |
| 64 // Fires system setting change notification. | 69 // Fires system setting change notification. |
| 65 timezone_value_.reset(base::Value::CreateStringValue( | 70 timezone_value_.reset(base::Value::CreateStringValue( |
| 66 system::TimezoneSettings::GetTimezoneID(timezone))); | 71 system::TimezoneSettings::GetTimezoneID(timezone))); |
| 67 NotifyObservers(kSystemTimezone); | 72 NotifyObservers(kSystemTimezone); |
| 68 } | 73 } |
| 69 | 74 |
| 70 } // namespace chromeos | 75 } // namespace chromeos |
| OLD | NEW |