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/timezone_settings.h" | 5 #include "chrome/browser/chromeos/system/timezone_settings.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/chromeos/chromeos_version.h" | |
11 #include "base/file_util.h" | 10 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
13 #include "base/logging.h" | 12 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
16 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
17 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
18 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
19 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/sys_info.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
22 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
23 #include "content/public/browser/render_widget_host.h" | 23 #include "content/public/browser/render_widget_host.h" |
24 #include "content/public/browser/render_widget_host_iterator.h" | 24 #include "content/public/browser/render_widget_host_iterator.h" |
25 #include "third_party/icu/source/i18n/unicode/timezone.h" | 25 #include "third_party/icu/source/i18n/unicode/timezone.h" |
26 | 26 |
27 using content::BrowserThread; | 27 using content::BrowserThread; |
28 | 28 |
29 namespace { | 29 namespace { |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 } // namespace | 436 } // namespace |
437 | 437 |
438 namespace chromeos { | 438 namespace chromeos { |
439 namespace system { | 439 namespace system { |
440 | 440 |
441 TimezoneSettings::Observer::~Observer() {} | 441 TimezoneSettings::Observer::~Observer() {} |
442 | 442 |
443 // static | 443 // static |
444 TimezoneSettings* TimezoneSettings::GetInstance() { | 444 TimezoneSettings* TimezoneSettings::GetInstance() { |
445 if (base::chromeos::IsRunningOnChromeOS()) { | 445 if (base::SysInfo::IsRunningOnChromeOS()) { |
446 return TimezoneSettingsImpl::GetInstance(); | 446 return TimezoneSettingsImpl::GetInstance(); |
447 } else { | 447 } else { |
448 return TimezoneSettingsStubImpl::GetInstance(); | 448 return TimezoneSettingsStubImpl::GetInstance(); |
449 } | 449 } |
450 } | 450 } |
451 | 451 |
452 // static | 452 // static |
453 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { | 453 string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { |
454 icu::UnicodeString id; | 454 icu::UnicodeString id; |
455 timezone.getID(id); | 455 timezone.getID(id); |
456 return string16(id.getBuffer(), id.length()); | 456 return string16(id.getBuffer(), id.length()); |
457 } | 457 } |
458 | 458 |
459 } // namespace system | 459 } // namespace system |
460 } // namespace chromeos | 460 } // namespace chromeos |
OLD | NEW |