OLD | NEW |
1 // Copyright (c) 2012 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/timezone_options_util.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.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/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
13 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/chromeos/system/timezone_settings.h" | 16 #include "chrome/browser/chromeos/system/timezone_settings.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
| 18 #include "third_party/icu/public/common/unicode/ures.h" |
| 19 #include "third_party/icu/public/common/unicode/utypes.h" |
| 20 #include "third_party/icu/public/i18n/unicode/calendar.h" |
| 21 #include "third_party/icu/public/i18n/unicode/timezone.h" |
18 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
19 #include "unicode/calendar.h" | |
20 #include "unicode/timezone.h" | |
21 #include "unicode/ures.h" | |
22 #include "unicode/utypes.h" | |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 struct UResClose { | 26 struct UResClose { |
27 inline void operator() (UResourceBundle* b) const { | 27 inline void operator() (UResourceBundle* b) const { |
28 ures_close(b); | 28 ures_close(b); |
29 } | 29 } |
30 }; | 30 }; |
31 | 31 |
32 static base::LazyInstance<base::Lock>::Leaky | 32 static base::LazyInstance<base::Lock>::Leaky |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 base::ListValue* option = new base::ListValue(); | 134 base::ListValue* option = new base::ListValue(); |
135 option->Append(new base::StringValue( | 135 option->Append(new base::StringValue( |
136 chromeos::system::TimezoneSettings::GetTimezoneID(*timezone))); | 136 chromeos::system::TimezoneSettings::GetTimezoneID(*timezone))); |
137 option->Append(new base::StringValue(GetTimezoneName(*timezone))); | 137 option->Append(new base::StringValue(GetTimezoneName(*timezone))); |
138 timezoneList->Append(option); | 138 timezoneList->Append(option); |
139 } | 139 } |
140 return timezoneList.Pass(); | 140 return timezoneList.Pass(); |
141 } | 141 } |
142 | 142 |
143 } // namespace options | 143 } // namespace options |
OLD | NEW |