| 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> |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 | 328 |
| 329 private: | 329 private: |
| 330 friend struct base::DefaultSingletonTraits<TimezoneSettingsStubImpl>; | 330 friend struct base::DefaultSingletonTraits<TimezoneSettingsStubImpl>; |
| 331 | 331 |
| 332 TimezoneSettingsStubImpl(); | 332 TimezoneSettingsStubImpl(); |
| 333 | 333 |
| 334 DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsStubImpl); | 334 DISALLOW_COPY_AND_ASSIGN(TimezoneSettingsStubImpl); |
| 335 }; | 335 }; |
| 336 | 336 |
| 337 TimezoneSettingsBaseImpl::~TimezoneSettingsBaseImpl() { | 337 TimezoneSettingsBaseImpl::~TimezoneSettingsBaseImpl() { |
| 338 STLDeleteElements(&timezones_); | 338 base::STLDeleteElements(&timezones_); |
| 339 } | 339 } |
| 340 | 340 |
| 341 const icu::TimeZone& TimezoneSettingsBaseImpl::GetTimezone() { | 341 const icu::TimeZone& TimezoneSettingsBaseImpl::GetTimezone() { |
| 342 return *timezone_.get(); | 342 return *timezone_.get(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 base::string16 TimezoneSettingsBaseImpl::GetCurrentTimezoneID() { | 345 base::string16 TimezoneSettingsBaseImpl::GetCurrentTimezoneID() { |
| 346 return chromeos::system::TimezoneSettings::GetTimezoneID(GetTimezone()); | 346 return chromeos::system::TimezoneSettings::GetTimezoneID(GetTimezone()); |
| 347 } | 347 } |
| 348 | 348 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 // static | 476 // static |
| 477 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { | 477 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { |
| 478 icu::UnicodeString id; | 478 icu::UnicodeString id; |
| 479 timezone.getID(id); | 479 timezone.getID(id); |
| 480 return base::string16(id.getBuffer(), id.length()); | 480 return base::string16(id.getBuffer(), id.length()); |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace system | 483 } // namespace system |
| 484 } // namespace chromeos | 484 } // namespace chromeos |
| OLD | NEW |