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/options/chromeos/system_settings_provider.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/system_settings_provider.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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 const icu::TimeZone* known_timezone = *iter; | 323 const icu::TimeZone* known_timezone = *iter; |
325 if (known_timezone->hasSameRules(timezone)) | 324 if (known_timezone->hasSameRules(timezone)) |
326 return GetTimezoneID(*known_timezone); | 325 return GetTimezoneID(*known_timezone); |
327 } | 326 } |
328 | 327 |
329 // Not able to find a matching timezone in our list. | 328 // Not able to find a matching timezone in our list. |
330 return string16(); | 329 return string16(); |
331 } | 330 } |
332 | 331 |
333 } // namespace chromeos | 332 } // namespace chromeos |
OLD | NEW |