| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/timezone_settings.h" | 5 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/chromeos/chromeos_version.h" |
| 8 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 10 #include "base/logging.h" | 11 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 13 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 14 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 15 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/chromeos/system/runtime_environment.h" | |
| 17 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 18 | 18 |
| 19 using content::BrowserThread; | 19 using content::BrowserThread; |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 namespace system { | 22 namespace system { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| 25 | 25 |
| 26 // The filepath to the timezone file that symlinks to the actual timezone file. | 26 // The filepath to the timezone file that symlinks to the actual timezone file. |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 timezone_.reset(icu::TimeZone::createDefault()); | 196 timezone_.reset(icu::TimeZone::createDefault()); |
| 197 } | 197 } |
| 198 | 198 |
| 199 scoped_ptr<icu::TimeZone> timezone_; | 199 scoped_ptr<icu::TimeZone> timezone_; |
| 200 ObserverList<Observer> observers_; | 200 ObserverList<Observer> observers_; |
| 201 | 201 |
| 202 DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsStubImpl); | 202 DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsStubImpl); |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 TimezoneSettings* TimezoneSettings::GetInstance() { | 205 TimezoneSettings* TimezoneSettings::GetInstance() { |
| 206 if (system::runtime_environment::IsRunningOnChromeOS()) { | 206 if (base::chromeos::IsRunningOnChromeOS()) { |
| 207 return TimezoneSettingsImpl::GetInstance(); | 207 return TimezoneSettingsImpl::GetInstance(); |
| 208 } else { | 208 } else { |
| 209 return TimezoneSettingsStubImpl::GetInstance(); | 209 return TimezoneSettingsStubImpl::GetInstance(); |
| 210 } | 210 } |
| 211 } | 211 } |
| 212 | 212 |
| 213 } // namespace system | 213 } // namespace system |
| 214 } // namespace chromeos | 214 } // namespace chromeos |
| OLD | NEW |