summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 18:25:00 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 18:25:00 +0000
commit3acbd4266a4e1ab21b2a180106705b7ff4116541 (patch)
treeaf16de2475460146f1af3b0df575b5c37630077f /chrome/browser/extensions/extension.cc
parent0675d76f6e250665bc699aec2c58c0b34524cd93 (diff)
downloadchromium_src-3acbd4266a4e1ab21b2a180106705b7ff4116541.zip
chromium_src-3acbd4266a4e1ab21b2a180106705b7ff4116541.tar.gz
chromium_src-3acbd4266a4e1ab21b2a180106705b7ff4116541.tar.bz2
Report errors during extension load. Change all the error strings to utf-8.
Review URL: http://codereview.chromium.org/13229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6522 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension.cc')
-rw-r--r--chrome/browser/extensions/extension.cc32
1 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/extensions/extension.cc b/chrome/browser/extensions/extension.cc
index de90637..a11afb0 100644
--- a/chrome/browser/extensions/extension.cc
+++ b/chrome/browser/extensions/extension.cc
@@ -16,23 +16,23 @@ const wchar_t* Extension::kNameKey = L"name";
const wchar_t* Extension::kDescriptionKey = L"description";
const wchar_t* Extension::kContentScriptsKey = L"content_scripts";
-const wchar_t* Extension::kInvalidManifestError =
- L"Manifest is missing or invalid.";
-const wchar_t* Extension::kInvalidFormatVersionError =
- L"Required key 'format_version' is missing or invalid";
-const wchar_t* Extension::kInvalidIdError =
- L"Required key 'id' is missing or invalid.";
-const wchar_t* Extension::kInvalidNameError =
- L"Required key 'name' is missing or has invalid type.";
-const wchar_t* Extension::kInvalidDescriptionError =
- L"Invalid type for 'description' key.";
-const wchar_t* Extension::kInvalidContentScriptsListError =
- L"Invalid type for 'content_scripts' key.";
-const wchar_t* Extension::kInvalidContentScriptError =
- L"Invalid type for content_scripts at index ";
+const char* Extension::kInvalidManifestError =
+ "Manifest is missing or invalid.";
+const char* Extension::kInvalidFormatVersionError =
+ "Required key 'format_version' is missing or invalid";
+const char* Extension::kInvalidIdError =
+ "Required key 'id' is missing or invalid.";
+const char* Extension::kInvalidNameError =
+ "Required key 'name' is missing or has invalid type.";
+const char* Extension::kInvalidDescriptionError =
+ "Invalid type for 'description' key.";
+const char* Extension::kInvalidContentScriptsListError =
+ "Invalid type for 'content_scripts' key.";
+const char* Extension::kInvalidContentScriptError =
+ "Invalid type for content_scripts at index ";
bool Extension::InitFromValue(const DictionaryValue& source,
- std::wstring* error) {
+ std::string* error) {
// Check format version.
int format_version = 0;
if (!source.GetInteger(kFormatVersionKey, &format_version) ||
@@ -76,7 +76,7 @@ bool Extension::InitFromValue(const DictionaryValue& source,
std::wstring content_script;
if (!list_value->Get(i, &value) || !value->GetAsString(&content_script)) {
*error = kInvalidContentScriptError;
- *error += IntToWString(i);
+ *error += IntToString(i);
return false;
}