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

Unified Diff: chrome/installer/util/language_selector.cc

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/util/language_selector.cc
diff --git a/chrome/installer/util/language_selector.cc b/chrome/installer/util/language_selector.cc
index 1c1a582654e3ee2e8027746aa66e03a607d42885..aa8555f4936fbe477f948725c602177880b270f7 100644
--- a/chrome/installer/util/language_selector.cc
+++ b/chrome/installer/util/language_selector.cc
@@ -243,13 +243,9 @@ bool LanguageSelector::SelectIf(const std::vector<std::wstring>& candidates,
SelectPred_Fn select_predicate,
std::wstring* matched_name,
int* matched_offset) {
- std::wstring candidate;
- for (std::vector<std::wstring>::const_iterator scan = candidates.begin(),
- end = candidates.end(); scan != end; ++scan) {
- candidate.assign(*scan);
- base::StringToLowerASCII(&candidate);
- if (select_predicate(candidate, matched_offset)) {
- matched_name->assign(*scan);
+ for (const std::wstring& scan : candidates) {
+ if (select_predicate(base::ToLowerASCII(scan), matched_offset)) {
+ matched_name->assign(scan);
return true;
}
}
« no previous file with comments | « chrome/common/importer/firefox_importer_utils.cc ('k') | chrome/renderer/pepper/pepper_flash_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698