| OLD | NEW |
| 1 // Copyright (c) 2011 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/ui/webui/options2/chromeos/system_settings_provider2.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/system_settings_provider2.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 "Australia/Hobart", | 114 "Australia/Hobart", |
| 115 "Australia/Sydney", | 115 "Australia/Sydney", |
| 116 "Asia/Vladivostok", | 116 "Asia/Vladivostok", |
| 117 "Pacific/Guam", | 117 "Pacific/Guam", |
| 118 "Asia/Magadan", | 118 "Asia/Magadan", |
| 119 "Pacific/Auckland", | 119 "Pacific/Auckland", |
| 120 "Pacific/Fiji", | 120 "Pacific/Fiji", |
| 121 "Pacific/Tongatapu", | 121 "Pacific/Tongatapu", |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 static base::LazyInstance<base::Lock, | 124 static base::LazyInstance<base::Lock>::Leaky |
| 125 base::LeakyLazyInstanceTraits<base::Lock> > | |
| 126 g_timezone_bundle_lock = LAZY_INSTANCE_INITIALIZER; | 125 g_timezone_bundle_lock = LAZY_INSTANCE_INITIALIZER; |
| 127 | 126 |
| 128 struct UResClose { | 127 struct UResClose { |
| 129 inline void operator() (UResourceBundle* b) const { | 128 inline void operator() (UResourceBundle* b) const { |
| 130 ures_close(b); | 129 ures_close(b); |
| 131 } | 130 } |
| 132 }; | 131 }; |
| 133 | 132 |
| 134 string16 GetExemplarCity(const icu::TimeZone& zone) { | 133 string16 GetExemplarCity(const icu::TimeZone& zone) { |
| 135 // TODO(jungshik): After upgrading to ICU 4.6, use U_ICUDATA_ZONE | 134 // TODO(jungshik): After upgrading to ICU 4.6, use U_ICUDATA_ZONE |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (known_timezone->hasSameRules(timezone)) | 325 if (known_timezone->hasSameRules(timezone)) |
| 327 return GetTimezoneID(*known_timezone); | 326 return GetTimezoneID(*known_timezone); |
| 328 } | 327 } |
| 329 | 328 |
| 330 // Not able to find a matching timezone in our list. | 329 // Not able to find a matching timezone in our list. |
| 331 return string16(); | 330 return string16(); |
| 332 } | 331 } |
| 333 | 332 |
| 334 } // namespace options2 | 333 } // namespace options2 |
| 335 } // namespace chromeos | 334 } // namespace chromeos |
| OLD | NEW |