| 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 "ui/base/l10n/l10n_util.h" | 5 #include "ui/base/l10n/l10n_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdlib> | 8 #include <cstdlib> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 "zh", | 195 "zh", |
| 196 "zh_hans_cn", | 196 "zh_hans_cn", |
| 197 "zh_hant_hk", | 197 "zh_hant_hk", |
| 198 "zh_hant_mo", | 198 "zh_hant_mo", |
| 199 "zh_hans_sg", | 199 "zh_hans_sg", |
| 200 "zh_hant_tw" | 200 "zh_hant_tw" |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 // Skip all the es_Foo other than es_419 for now. | 203 // Skip all the es_Foo other than es_419 for now. |
| 204 if (base::StartsWithASCII(locale_name, "es_", false)) | 204 if (base::StartsWithASCII(locale_name, "es_", false)) |
| 205 return !EndsWith(locale_name, "419", true); | 205 return !base::EndsWith(locale_name, "419", true); |
| 206 | 206 |
| 207 for (size_t i = 0; i < arraysize(kDuplicateNames); ++i) { | 207 for (size_t i = 0; i < arraysize(kDuplicateNames); ++i) { |
| 208 if (base::strcasecmp(kDuplicateNames[i], locale_name.c_str()) == 0) | 208 if (base::strcasecmp(kDuplicateNames[i], locale_name.c_str()) == 0) |
| 209 return true; | 209 return true; |
| 210 } | 210 } |
| 211 return false; | 211 return false; |
| 212 } | 212 } |
| 213 | 213 |
| 214 // We added 30+ minimally populated locales with only a few entries | 214 // We added 30+ minimally populated locales with only a few entries |
| 215 // (exemplar character set, script, writing direction and its own | 215 // (exemplar character set, script, writing direction and its own |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 | 873 |
| 874 const char* const* GetAcceptLanguageListForTesting() { | 874 const char* const* GetAcceptLanguageListForTesting() { |
| 875 return kAcceptLanguageList; | 875 return kAcceptLanguageList; |
| 876 } | 876 } |
| 877 | 877 |
| 878 size_t GetAcceptLanguageListSizeForTesting() { | 878 size_t GetAcceptLanguageListSizeForTesting() { |
| 879 return arraysize(kAcceptLanguageList); | 879 return arraysize(kAcceptLanguageList); |
| 880 } | 880 } |
| 881 | 881 |
| 882 } // namespace l10n_util | 882 } // namespace l10n_util |
| OLD | NEW |