Chromium Code Reviews| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 | 461 |
| 462 } // namespace | 462 } // namespace |
| 463 | 463 |
| 464 namespace chromeos { | 464 namespace chromeos { |
| 465 namespace system { | 465 namespace system { |
| 466 | 466 |
| 467 TimezoneSettings::Observer::~Observer() {} | 467 TimezoneSettings::Observer::~Observer() {} |
| 468 | 468 |
| 469 // static | 469 // static |
| 470 TimezoneSettings* TimezoneSettings::GetInstance() { | 470 TimezoneSettings* TimezoneSettings::GetInstance() { |
| 471 if (base::SysInfo::IsRunningOnChromeOS()) { | 471 if (base::SysInfo::IsRunningAsSystemCompositor()) { |
|
rjkroege
2017/01/02 01:26:27
Are you sure that you should have changed this one
reveman
2017/01/02 07:11:32
hm, maybe the stub impl works better on non-chrome
| |
| 472 return TimezoneSettingsImpl::GetInstance(); | 472 return TimezoneSettingsImpl::GetInstance(); |
| 473 } else { | 473 } else { |
| 474 return TimezoneSettingsStubImpl::GetInstance(); | 474 return TimezoneSettingsStubImpl::GetInstance(); |
| 475 } | 475 } |
| 476 } | 476 } |
| 477 | 477 |
| 478 // static | 478 // static |
| 479 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { | 479 base::string16 TimezoneSettings::GetTimezoneID(const icu::TimeZone& timezone) { |
| 480 icu::UnicodeString id; | 480 icu::UnicodeString id; |
| 481 timezone.getID(id); | 481 timezone.getID(id); |
| 482 return base::string16(id.getBuffer(), id.length()); | 482 return base::string16(id.getBuffer(), id.length()); |
| 483 } | 483 } |
| 484 | 484 |
| 485 } // namespace system | 485 } // namespace system |
| 486 } // namespace chromeos | 486 } // namespace chromeos |
| OLD | NEW |