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/common/extensions/extension_l10n_util.h" | 5 #include "chrome/common/extensions/extension_l10n_util.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/json/json_file_value_serializer.h" | 13 #include "base/json/json_file_value_serializer.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
16 #include "base/stringprintf.h" | 16 #include "base/stringprintf.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/extensions/extension_manifest_constants.h" | 19 #include "chrome/common/extensions/extension_manifest_constants.h" |
20 #include "chrome/common/extensions/extension_file_util.h" | 20 #include "chrome/common/extensions/extension_file_util.h" |
21 #include "chrome/common/extensions/message_bundle.h" | 21 #include "chrome/common/extensions/message_bundle.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
| 23 #include "third_party/icu/public/common/unicode/uloc.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
24 #include "unicode/uloc.h" | |
25 | 25 |
26 namespace errors = extension_manifest_errors; | 26 namespace errors = extension_manifest_errors; |
27 namespace keys = extension_manifest_keys; | 27 namespace keys = extension_manifest_keys; |
28 | 28 |
29 static std::string& GetProcessLocale() { | 29 static std::string& GetProcessLocale() { |
30 CR_DEFINE_STATIC_LOCAL(std::string, locale, ()); | 30 CR_DEFINE_STATIC_LOCAL(std::string, locale, ()); |
31 return locale; | 31 return locale; |
32 } | 32 } |
33 | 33 |
34 namespace extension_l10n_util { | 34 namespace extension_l10n_util { |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 ScopedLocaleForTest::ScopedLocaleForTest(const std::string& locale) | 360 ScopedLocaleForTest::ScopedLocaleForTest(const std::string& locale) |
361 : locale_(extension_l10n_util::CurrentLocaleOrDefault()) { | 361 : locale_(extension_l10n_util::CurrentLocaleOrDefault()) { |
362 extension_l10n_util::SetProcessLocale(locale); | 362 extension_l10n_util::SetProcessLocale(locale); |
363 } | 363 } |
364 | 364 |
365 ScopedLocaleForTest::~ScopedLocaleForTest() { | 365 ScopedLocaleForTest::~ScopedLocaleForTest() { |
366 extension_l10n_util::SetProcessLocale(locale_); | 366 extension_l10n_util::SetProcessLocale(locale_); |
367 } | 367 } |
368 | 368 |
369 } // namespace extension_l10n_util | 369 } // namespace extension_l10n_util |
OLD | NEW |