| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_SYSTEM_LIBRARY_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_SYSTEM_LIBRARY_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/scoped_ptr.h" | |
| 11 #include "chrome/browser/chromeos/cros/system_library.h" | |
| 12 #include "unicode/timezone.h" | |
| 13 | |
| 14 namespace chromeos { | |
| 15 | |
| 16 class FakeSystemLibrary : public SystemLibrary { | |
| 17 public: | |
| 18 FakeSystemLibrary() { | |
| 19 std::string id = "US/Pacific"; | |
| 20 icu::TimeZone* timezone = | |
| 21 icu::TimeZone::createTimeZone(icu::UnicodeString::fromUTF8(id)); | |
| 22 timezone_.reset(timezone); | |
| 23 } | |
| 24 virtual ~FakeSystemLibrary() {} | |
| 25 virtual void AddObserver(Observer* observer) {} | |
| 26 virtual void RemoveObserver(Observer* observer) {} | |
| 27 virtual const icu::TimeZone& GetTimezone() { | |
| 28 return *timezone_.get(); | |
| 29 } | |
| 30 virtual void SetTimezone(const icu::TimeZone*) {} | |
| 31 | |
| 32 private: | |
| 33 scoped_ptr<icu::TimeZone> timezone_; | |
| 34 }; | |
| 35 | |
| 36 } // namespace chromeos | |
| 37 | |
| 38 #endif // CHROME_BROWSER_CHROMEOS_CROS_FAKE_FAKE_SYSTEM_LIBRARY_H_ | |
| OLD | NEW |