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

Unified Diff: chrome/common/extensions/extension_message_bundle.cc

Issue 3117017: Remove deprecated wstring Get(As)String() methods from Value, etc. (Closed)
Patch Set: fix win Created 10 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/common/extensions/extension_message_bundle.cc
diff --git a/chrome/common/extensions/extension_message_bundle.cc b/chrome/common/extensions/extension_message_bundle.cc
index 04022cd33575537b9f26fd804c0b2638effb72f2..8dd52750fd6be258f0a63d5409aa755af24777d8 100644
--- a/chrome/common/extensions/extension_message_bundle.cc
+++ b/chrome/common/extensions/extension_message_bundle.cc
@@ -22,9 +22,9 @@
namespace errors = extension_manifest_errors;
-const wchar_t* ExtensionMessageBundle::kContentKey = L"content";
-const wchar_t* ExtensionMessageBundle::kMessageKey = L"message";
-const wchar_t* ExtensionMessageBundle::kPlaceholdersKey = L"placeholders";
+const char* ExtensionMessageBundle::kContentKey = "content";
+const char* ExtensionMessageBundle::kMessageKey = "message";
+const char* ExtensionMessageBundle::kPlaceholdersKey = "placeholders";
const char* ExtensionMessageBundle::kPlaceholderBegin = "$";
const char* ExtensionMessageBundle::kPlaceholderEnd = "$";
@@ -138,8 +138,7 @@ bool ExtensionMessageBundle::GetMessageValue(const std::string& key,
}
// Extract message from it.
if (!name_tree->GetString(kMessageKey, value)) {
- *error = StringPrintf("There is no \"%s\" element for key %s.",
- WideToUTF8(kMessageKey).c_str(),
+ *error = StringPrintf("There is no \"%s\" element for key %s.", kMessageKey,
key.c_str());
return false;
}
@@ -167,8 +166,7 @@ bool ExtensionMessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
DictionaryValue* placeholders_tree;
if (!name_tree.GetDictionary(kPlaceholdersKey, &placeholders_tree)) {
*error = StringPrintf("Not a valid \"%s\" element for key %s.",
- WideToUTF8(kPlaceholdersKey).c_str(),
- name_key.c_str());
+ kPlaceholdersKey, name_key.c_str());
return false;
}
@@ -188,8 +186,7 @@ bool ExtensionMessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
std::string content;
if (!placeholder->GetString(kContentKey, &content)) {
*error = StringPrintf("Invalid \"%s\" element for key %s.",
- WideToUTF8(kContentKey).c_str(),
- name_key.c_str());
+ kContentKey, name_key.c_str());
return false;
}
(*placeholders)[StringToLowerASCII(content_key)] = content;
« no previous file with comments | « chrome/common/extensions/extension_message_bundle.h ('k') | chrome/common/extensions/extension_message_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698