| 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 #include "chromeos/settings/timezone_settings.h" | 5 #include "chromeos/settings/timezone_settings.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/i18n/unicodestring.h" |
| 15 #include "base/location.h" | 16 #include "base/location.h" |
| 16 #include "base/logging.h" | 17 #include "base/logging.h" |
| 17 #include "base/macros.h" | 18 #include "base/macros.h" |
| 18 #include "base/memory/ptr_util.h" | 19 #include "base/memory/ptr_util.h" |
| 19 #include "base/memory/singleton.h" | 20 #include "base/memory/singleton.h" |
| 20 #include "base/observer_list.h" | 21 #include "base/observer_list.h" |
| 21 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
| 22 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
| 23 #include "base/sys_info.h" | 24 #include "base/sys_info.h" |
| 24 #include "base/task_runner.h" | 25 #include "base/task_runner.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 if (base::SysInfo::IsRunningOnChromeOS()) { | 477 if (base::SysInfo::IsRunningOnChromeOS()) { |
| 477 return TimezoneSettingsImpl::GetInstance(); | 478 return TimezoneSettingsImpl::GetInstance(); |
| 478 } else { | 479 } else { |
| 479 return TimezoneSettingsStubImpl::GetInstance(); | 480 return TimezoneSettingsStubImpl::GetInstance(); |
| 480 } | 481 } |
| 481 } | 482 } |
| 482 | 483 |
| 483 // static | 484 // static |
| 484 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { | 485 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { |
| 485 icu::UnicodeString id; | 486 icu::UnicodeString id; |
| 486 timezone.getID(id); | 487 return base::i18n::UnicodeStringToString16(timezone.getID(id)); |
| 487 return base::string16(id.getBuffer(), id.length()); | |
| 488 } | 488 } |
| 489 | 489 |
| 490 } // namespace system | 490 } // namespace system |
| 491 } // namespace chromeos | 491 } // namespace chromeos |
| OLD | NEW |