Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: chrome/installer/util/language_selector.cc

Issue 1116263002: Revert of Add installer_util_unittests to the GN windows build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wintests3
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "base/win/i18n.h" 16 #include "base/win/i18n.h"
17 #include "chrome/installer/util/google_update_settings.h" 17 #include "chrome/installer/util/google_update_settings.h"
18 #include "chrome/installer/util/installer_util_strings.h" 18
19 #include "installer_util_strings.h"
19 20
20 namespace { 21 namespace {
21 22
22 struct LangToOffset { 23 struct LangToOffset {
23 const wchar_t* language; 24 const wchar_t* language;
24 int offset; 25 int offset;
25 }; 26 };
26 27
27 // The language we fall back upon when all else fails. 28 // The language we fall back upon when all else fails.
28 const wchar_t kFallbackLanguage[] = L"en-us"; 29 const wchar_t kFallbackLanguage[] = L"en-us";
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 VLOG(1) << "No suitable language found for any candidates."; 287 VLOG(1) << "No suitable language found for any candidates.";
287 288
288 // Our fallback is "en-us" 289 // Our fallback is "en-us"
289 matched_candidate_.assign(&kFallbackLanguage[0], 290 matched_candidate_.assign(&kFallbackLanguage[0],
290 arraysize(kFallbackLanguage) - 1); 291 arraysize(kFallbackLanguage) - 1);
291 offset_ = kFallbackLanguageOffset; 292 offset_ = kFallbackLanguageOffset;
292 } 293 }
293 } 294 }
294 295
295 } // namespace installer 296 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/installer_util_unittests.rc ('k') | chrome/installer/util/logging_installer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698