| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ | 5 #ifndef CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ |
| 6 #define CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ | 6 #define CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual const icu::TimeZone& GetTimezone() = 0; | 35 virtual const icu::TimeZone& GetTimezone() = 0; |
| 36 virtual base::string16 GetCurrentTimezoneID() = 0; | 36 virtual base::string16 GetCurrentTimezoneID() = 0; |
| 37 | 37 |
| 38 // Sets the current timezone and notifies all Observers. | 38 // Sets the current timezone and notifies all Observers. |
| 39 virtual void SetTimezone(const icu::TimeZone& timezone) = 0; | 39 virtual void SetTimezone(const icu::TimeZone& timezone) = 0; |
| 40 virtual void SetTimezoneFromID(const base::string16& timezone_id) = 0; | 40 virtual void SetTimezoneFromID(const base::string16& timezone_id) = 0; |
| 41 | 41 |
| 42 virtual void AddObserver(Observer* observer) = 0; | 42 virtual void AddObserver(Observer* observer) = 0; |
| 43 virtual void RemoveObserver(Observer* observer) = 0; | 43 virtual void RemoveObserver(Observer* observer) = 0; |
| 44 | 44 |
| 45 virtual const std::vector<icu::TimeZone*>& GetTimezoneList() const = 0; | 45 virtual const std::vector<std::unique_ptr<icu::TimeZone>>& GetTimezoneList() |
| 46 const = 0; |
| 46 | 47 |
| 47 // Gets timezone ID which is also used as timezone pref value. | 48 // Gets timezone ID which is also used as timezone pref value. |
| 48 static base::string16 GetTimezoneID(const icu::TimeZone& timezone); | 49 static base::string16 GetTimezoneID(const icu::TimeZone& timezone); |
| 49 | 50 |
| 50 protected: | 51 protected: |
| 51 virtual ~TimezoneSettings() {} | 52 virtual ~TimezoneSettings() {} |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 } // namespace system | 55 } // namespace system |
| 55 } // namespace chromeos | 56 } // namespace chromeos |
| 56 | 57 |
| 57 #endif // CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ | 58 #endif // CHROMEOS_SETTINGS_TIMEZONE_SETTINGS_H_ |
| OLD | NEW |