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

Unified Diff: extensions/common/message_bundle.cc

Issue 1282363003: Convert remaining StringToLowerASCII to ToLowerASCII (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
« no previous file with comments | « extensions/common/csp_validator.cc ('k') | extensions/common/permissions/socket_permission_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/message_bundle.cc
diff --git a/extensions/common/message_bundle.cc b/extensions/common/message_bundle.cc
index d71513ff5affc80a8eb52114003a4c80f1ffff22..2c387e1ad1659a06714e0e08f8d51a0478952846 100644
--- a/extensions/common/message_bundle.cc
+++ b/extensions/common/message_bundle.cc
@@ -76,7 +76,7 @@ bool MessageBundle::Init(const CatalogVector& locale_catalogs,
base::DictionaryValue* catalog = (*it).get();
for (base::DictionaryValue::Iterator message_it(*catalog);
!message_it.IsAtEnd(); message_it.Advance()) {
- std::string key(base::StringToLowerASCII(message_it.key()));
+ std::string key(base::ToLowerASCII(message_it.key()));
if (!IsValidName(message_it.key()))
return BadKeyMessage(key, error);
std::string value;
@@ -191,7 +191,7 @@ bool MessageBundle::GetPlaceholders(const base::DictionaryValue& name_tree,
kContentKey, name_key.c_str());
return false;
}
- (*placeholders)[base::StringToLowerASCII(content_key)] = content;
+ (*placeholders)[base::ToLowerASCII(content_key)] = content;
}
return true;
@@ -240,7 +240,7 @@ bool MessageBundle::ReplaceVariables(const SubstitutionMap& variables,
if (beg_index >= message->size())
return true;
std::string::size_type end_index =
- message->find(var_end_delimiter, beg_index);
+ message->find(var_end_delimiter, beg_index);
if (end_index == message->npos)
return true;
@@ -249,8 +249,7 @@ bool MessageBundle::ReplaceVariables(const SubstitutionMap& variables,
message->substr(beg_index, end_index - beg_index);
if (!IsValidName(var_name))
continue;
- SubstitutionMap::const_iterator it =
- variables.find(base::StringToLowerASCII(var_name));
+ auto it = variables.find(base::ToLowerASCII(var_name));
if (it == variables.end()) {
*error = base::StringPrintf("Variable %s%s%s used but not defined.",
var_begin_delimiter.c_str(),
@@ -298,8 +297,7 @@ std::string MessageBundle::GetL10nMessage(const std::string& name) const {
// static
std::string MessageBundle::GetL10nMessage(const std::string& name,
const SubstitutionMap& dictionary) {
- SubstitutionMap::const_iterator it =
- dictionary.find(base::StringToLowerASCII(name));
+ auto it = dictionary.find(base::ToLowerASCII(name));
if (it != dictionary.end()) {
return it->second;
}
« no previous file with comments | « extensions/common/csp_validator.cc ('k') | extensions/common/permissions/socket_permission_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698