| 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 // This file defines a helper class for selecting a supported language from a | 5 // This file defines a helper class for selecting a supported language from a |
| 6 // set of candidates. | 6 // set of candidates. |
| 7 | 7 |
| 8 #include "chrome/installer/util/language_selector.h" | 8 #include "chrome/installer/util/language_selector.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <functional> | 11 #include <functional> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/win/i18n.h" | 15 #include "base/win/i18n.h" |
| 16 #include "chrome/installer/util/google_update_settings.h" | 16 #include "chrome/installer/util/google_update_settings.h" |
| 17 | 17 |
| 18 #include "installer_util_strings.h" | 18 #include "installer_util_strings.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 struct LangToOffset { | 22 struct LangToOffset { |
| 23 const wchar_t* language; | 23 const wchar_t* language; |
| 24 int offset; | 24 int offset; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 VLOG(1) << "No suitable language found for any candidates."; | 286 VLOG(1) << "No suitable language found for any candidates."; |
| 287 | 287 |
| 288 // Our fallback is "en-us" | 288 // Our fallback is "en-us" |
| 289 matched_candidate_.assign(&kFallbackLanguage[0], | 289 matched_candidate_.assign(&kFallbackLanguage[0], |
| 290 arraysize(kFallbackLanguage) - 1); | 290 arraysize(kFallbackLanguage) - 1); |
| 291 offset_ = kFallbackLanguageOffset; | 291 offset_ = kFallbackLanguageOffset; |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 } // namespace installer | 295 } // namespace installer |
| OLD | NEW |