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/spellcheck_common.h" | 5 #include "chrome/common/spellcheck_common.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "third_party/icu/public/common/unicode/uloc.h" | 9 #include "third_party/icu/source/common/unicode/uloc.h" |
10 | 10 |
11 namespace chrome { | 11 namespace chrome { |
12 namespace spellcheck_common { | 12 namespace spellcheck_common { |
13 | 13 |
14 struct LanguageRegion { | 14 struct LanguageRegion { |
15 const char* language; // The language. | 15 const char* language; // The language. |
16 const char* language_region; // language & region, used by dictionaries. | 16 const char* language_region; // language & region, used by dictionaries. |
17 }; | 17 }; |
18 | 18 |
19 struct LanguageVersion { | 19 struct LanguageVersion { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 error = U_ZERO_ERROR; | 163 error = U_ZERO_ERROR; |
164 uloc_getLanguage(id, language, arraysize(language), &error); | 164 uloc_getLanguage(id, language, arraysize(language), &error); |
165 country = uloc_getISO3Country(id); | 165 country = uloc_getISO3Country(id); |
166 } | 166 } |
167 *language_code = std::string(language); | 167 *language_code = std::string(language); |
168 *country_code = std::string(country); | 168 *country_code = std::string(country); |
169 } | 169 } |
170 | 170 |
171 } // namespace spellcheck_common | 171 } // namespace spellcheck_common |
172 } // namespace chrome | 172 } // namespace chrome |
OLD | NEW |