OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/win/i18n.h" | 5 #include "base/win/i18n.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return true; | 68 return true; |
69 } else { | 69 } else { |
70 DPCHECK(0 == language_count) | 70 DPCHECK(0 == language_count) |
71 << "Failed getting preferred UI languages."; | 71 << "Failed getting preferred UI languages."; |
72 } | 72 } |
73 } else { | 73 } else { |
74 DPCHECK(0 == buffer_length) | 74 DPCHECK(0 == buffer_length) |
75 << "Failed getting size of preferred UI languages."; | 75 << "Failed getting size of preferred UI languages."; |
76 } | 76 } |
77 } else { | 77 } else { |
78 VLOG(2) << "MUI not available."; | 78 DVLOG(2) << "MUI not available."; |
79 } | 79 } |
80 } else { | 80 } else { |
81 NOTREACHED() << "kernel32.dll not found."; | 81 NOTREACHED() << "kernel32.dll not found."; |
82 } | 82 } |
83 | 83 |
84 return false; | 84 return false; |
85 } | 85 } |
86 | 86 |
87 bool GetUserDefaultUILanguage(std::wstring* language, std::wstring* region) { | 87 bool GetUserDefaultUILanguage(std::wstring* language, std::wstring* region) { |
88 DCHECK(language); | 88 DCHECK(language); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 bool GetThreadPreferredUILanguageList(std::vector<std::wstring>* languages) { | 160 bool GetThreadPreferredUILanguageList(std::vector<std::wstring>* languages) { |
161 DCHECK(languages); | 161 DCHECK(languages); |
162 return GetPreferredUILanguageList( | 162 return GetPreferredUILanguageList( |
163 THREAD_LANGUAGES, MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK, | 163 THREAD_LANGUAGES, MUI_MERGE_SYSTEM_FALLBACK | MUI_MERGE_USER_FALLBACK, |
164 languages); | 164 languages); |
165 } | 165 } |
166 | 166 |
167 } // namespace i18n | 167 } // namespace i18n |
168 } // namespace win | 168 } // namespace win |
169 } // namespace base | 169 } // namespace base |
OLD | NEW |