summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-08 06:17:43 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-08 06:17:43 +0000
commit0a576a3e5f83d63dea048d5545a81dc4c2966daa (patch)
treef5d9c5632338cc006de9c2d40e4176545c302185 /chrome/browser/extensions
parentc1b7d8cca2a09cb396d5899510edb2156e6de984 (diff)
downloadchromium_src-0a576a3e5f83d63dea048d5545a81dc4c2966daa.zip
chromium_src-0a576a3e5f83d63dea048d5545a81dc4c2966daa.tar.gz
chromium_src-0a576a3e5f83d63dea048d5545a81dc4c2966daa.tar.bz2
De-wstring/wchar_t-ify extensions DOM UI as much as currently possible.
BUG=23581 TEST=builds and tests pass Review URL: http://codereview.chromium.org/2808110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_dom_ui.cc16
-rw-r--r--chrome/browser/extensions/extensions_ui.cc226
-rw-r--r--chrome/browser/extensions/extensions_ui.h2
-rw-r--r--chrome/browser/extensions/pack_extension_job.cc2
-rw-r--r--chrome/browser/extensions/pack_extension_job.h2
5 files changed, 125 insertions, 123 deletions
diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc
index 7cbe08f..bae8127 100644
--- a/chrome/browser/extensions/extension_dom_ui.cc
+++ b/chrome/browser/extensions/extension_dom_ui.cc
@@ -288,8 +288,8 @@ void ExtensionDOMUI::RegisterChromeURLOverrides(
// For each override provided by the extension, add it to the front of
// the override list if it's not already in the list.
Extension::URLOverrideMap::const_iterator iter = overrides.begin();
- for (;iter != overrides.end(); ++iter) {
- const std::wstring key = UTF8ToWide((*iter).first);
+ for (; iter != overrides.end(); ++iter) {
+ const std::string& key = iter->first;
ListValue* page_overrides;
if (!all_overrides->GetList(key, &page_overrides)) {
page_overrides = new ListValue();
@@ -305,7 +305,7 @@ void ExtensionDOMUI::RegisterChromeURLOverrides(
NOTREACHED();
continue;
}
- if (override_val == (*iter).second.spec())
+ if (override_val == iter->second.spec())
break;
}
// This value is already in the list, leave it alone.
@@ -314,7 +314,7 @@ void ExtensionDOMUI::RegisterChromeURLOverrides(
}
// Insert the override at the front of the list. Last registered override
// wins.
- page_overrides->Insert(0, new StringValue((*iter).second.spec()));
+ page_overrides->Insert(0, new StringValue(iter->second.spec()));
}
}
@@ -368,16 +368,16 @@ void ExtensionDOMUI::UnregisterChromeURLOverrides(
DictionaryValue* all_overrides =
prefs->GetMutableDictionary(kExtensionURLOverrides);
Extension::URLOverrideMap::const_iterator iter = overrides.begin();
- for (;iter != overrides.end(); ++iter) {
- std::wstring page = UTF8ToWide((*iter).first);
+ for (; iter != overrides.end(); ++iter) {
+ const std::string& page = iter->first;
ListValue* page_overrides;
if (!all_overrides->GetList(page, &page_overrides)) {
// If it's being unregistered, it should already be in the list.
NOTREACHED();
continue;
} else {
- StringValue override((*iter).second.spec());
- UnregisterAndReplaceOverride((*iter).first, profile,
+ StringValue override(iter->second.spec());
+ UnregisterAndReplaceOverride(iter->first, profile,
page_overrides, &override);
}
}
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index f2badb3..a26ab07 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -85,74 +85,75 @@ ExtensionsUIHTMLSource::ExtensionsUIHTMLSource()
void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
bool is_off_the_record, int request_id) {
DictionaryValue localized_strings;
- localized_strings.SetString(L"title",
- l10n_util::GetString(IDS_EXTENSIONS_TITLE));
- localized_strings.SetString(L"devModeLink",
- l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_MODE_LINK));
- localized_strings.SetString(L"devModePrefix",
- l10n_util::GetString(IDS_EXTENSIONS_DEVELOPER_MODE_PREFIX));
- localized_strings.SetString(L"loadUnpackedButton",
- l10n_util::GetString(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
- localized_strings.SetString(L"packButton",
- l10n_util::GetString(IDS_EXTENSIONS_PACK_BUTTON));
- localized_strings.SetString(L"updateButton",
- l10n_util::GetString(IDS_EXTENSIONS_UPDATE_BUTTON));
- localized_strings.SetString(L"noExtensions",
- l10n_util::GetString(IDS_EXTENSIONS_NONE_INSTALLED));
- localized_strings.SetString(L"suggestGallery",
- l10n_util::GetStringF(IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY,
- std::wstring(L"<a href='") +
- ASCIIToWide(google_util::AppendGoogleLocaleParam(
- GURL(Extension::ChromeStoreURL())).spec()) + L"'>",
- L"</a>"));
- localized_strings.SetString(L"getMoreExtensions",
- std::wstring(L"<a href='") +
- ASCIIToWide(google_util::AppendGoogleLocaleParam(
- GURL(Extension::ChromeStoreURL())).spec()) + L"'>" +
- l10n_util::GetString(IDS_GET_MORE_EXTENSIONS) +
- L"</a>");
- localized_strings.SetString(L"extensionDisabled",
- l10n_util::GetString(IDS_EXTENSIONS_DISABLED_EXTENSION));
- localized_strings.SetString(L"inDevelopment",
- l10n_util::GetString(IDS_EXTENSIONS_IN_DEVELOPMENT));
- localized_strings.SetString(L"extensionId",
- l10n_util::GetString(IDS_EXTENSIONS_ID));
- localized_strings.SetString(L"extensionVersion",
- l10n_util::GetString(IDS_EXTENSIONS_VERSION));
- localized_strings.SetString(L"inspectViews",
- l10n_util::GetString(IDS_EXTENSIONS_INSPECT_VIEWS));
- localized_strings.SetString(L"inspectPopupsInstructions",
- l10n_util::GetString(IDS_EXTENSIONS_INSPECT_POPUPS_INSTRUCTIONS));
- localized_strings.SetString(L"disable",
- l10n_util::GetString(IDS_EXTENSIONS_DISABLE));
- localized_strings.SetString(L"enable",
- l10n_util::GetString(IDS_EXTENSIONS_ENABLE));
- localized_strings.SetString(L"enableIncognito",
- l10n_util::GetString(IDS_EXTENSIONS_ENABLE_INCOGNITO));
- localized_strings.SetString(L"allowFileAccess",
- l10n_util::GetString(IDS_EXTENSIONS_ALLOW_FILE_ACCESS));
- localized_strings.SetString(L"incognitoWarning",
- l10n_util::GetString(IDS_EXTENSIONS_INCOGNITO_WARNING));
- localized_strings.SetString(L"reload",
- l10n_util::GetString(IDS_EXTENSIONS_RELOAD));
- localized_strings.SetString(L"uninstall",
- l10n_util::GetString(IDS_EXTENSIONS_UNINSTALL));
- localized_strings.SetString(L"options",
- l10n_util::GetString(IDS_EXTENSIONS_OPTIONS));
- localized_strings.SetString(L"packDialogTitle",
- l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_TITLE));
- localized_strings.SetString(L"packDialogHeading",
- l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_HEADING));
- localized_strings.SetString(L"rootDirectoryLabel",
- l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_ROOT_DIRECTORY_LABEL));
- localized_strings.SetString(L"packDialogBrowse",
- l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_BROWSE));
- localized_strings.SetString(L"privateKeyLabel",
- l10n_util::GetString(IDS_EXTENSION_PACK_DIALOG_PRIVATE_KEY_LABEL));
- localized_strings.SetString(L"okButton",
- l10n_util::GetString(IDS_OK));
- localized_strings.SetString(L"cancelButton",
- l10n_util::GetString(IDS_CANCEL));
+ localized_strings.SetString("title",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_TITLE));
+ localized_strings.SetString("devModeLink",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_DEVELOPER_MODE_LINK));
+ localized_strings.SetString("devModePrefix",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_DEVELOPER_MODE_PREFIX));
+ localized_strings.SetString("loadUnpackedButton",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_LOAD_UNPACKED_BUTTON));
+ localized_strings.SetString("packButton",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_PACK_BUTTON));
+ localized_strings.SetString("updateButton",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON));
+ localized_strings.SetString("noExtensions",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_NONE_INSTALLED));
+ localized_strings.SetString("suggestGallery",
+ l10n_util::GetStringFUTF16(IDS_EXTENSIONS_NONE_INSTALLED_SUGGEST_GALLERY,
+ ASCIIToUTF16("<a href='") +
+ ASCIIToUTF16(google_util::AppendGoogleLocaleParam(
+ GURL(Extension::ChromeStoreURL())).spec()) + ASCIIToUTF16("'>"),
+ ASCIIToUTF16("</a>")));
+ localized_strings.SetString("getMoreExtensions",
+ ASCIIToUTF16("<a href='") +
+ ASCIIToUTF16(google_util::AppendGoogleLocaleParam(
+ GURL(Extension::ChromeStoreURL())).spec()) + ASCIIToUTF16("'>") +
+ l10n_util::GetStringUTF16(IDS_GET_MORE_EXTENSIONS) +
+ ASCIIToUTF16("</a>"));
+ localized_strings.SetString("extensionDisabled",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLED_EXTENSION));
+ localized_strings.SetString("inDevelopment",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_IN_DEVELOPMENT));
+ localized_strings.SetString("extensionId",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_ID));
+ localized_strings.SetString("extensionVersion",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_VERSION));
+ localized_strings.SetString("inspectViews",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_INSPECT_VIEWS));
+ localized_strings.SetString("inspectPopupsInstructions",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_INSPECT_POPUPS_INSTRUCTIONS));
+ localized_strings.SetString("disable",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_DISABLE));
+ localized_strings.SetString("enable",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_ENABLE));
+ localized_strings.SetString("enableIncognito",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_ENABLE_INCOGNITO));
+ localized_strings.SetString("allowFileAccess",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_ALLOW_FILE_ACCESS));
+ localized_strings.SetString("incognitoWarning",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_INCOGNITO_WARNING));
+ localized_strings.SetString("reload",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD));
+ localized_strings.SetString("uninstall",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_UNINSTALL));
+ localized_strings.SetString("options",
+ l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS));
+ localized_strings.SetString("packDialogTitle",
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_TITLE));
+ localized_strings.SetString("packDialogHeading",
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_HEADING));
+ localized_strings.SetString("rootDirectoryLabel",
+ l10n_util::GetStringUTF16(
+ IDS_EXTENSION_PACK_DIALOG_ROOT_DIRECTORY_LABEL));
+ localized_strings.SetString("packDialogBrowse",
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_BROWSE));
+ localized_strings.SetString("privateKeyLabel",
+ l10n_util::GetStringUTF16(IDS_EXTENSION_PACK_DIALOG_PRIVATE_KEY_LABEL));
+ localized_strings.SetString("okButton",
+ l10n_util::GetStringUTF16(IDS_OK));
+ localized_strings.SetString("cancelButton",
+ l10n_util::GetStringUTF16(IDS_CANCEL));
SetFontAndTextDirection(&localized_strings);
@@ -201,7 +202,7 @@ void ExtensionsDOMHandler::IconLoader::LoadIconsOnFileThread(
scoped_ptr<DictionaryValue> json_deleter(json);
ListValue* extensions = NULL;
- CHECK(json->GetList(L"extensions", &extensions));
+ CHECK(json->GetList("extensions", &extensions));
for (size_t i = 0; i < icons->size(); ++i) {
DictionaryValue* extension = NULL;
@@ -221,7 +222,7 @@ void ExtensionsDOMHandler::IconLoader::LoadIconsOnFileThread(
// If the extension is disabled, we desaturate the icon to add to the
// disabledness effect.
bool enabled = false;
- CHECK(extension->GetBoolean(L"enabled", &enabled));
+ CHECK(extension->GetBoolean("enabled", &enabled));
if (!enabled) {
const unsigned char* data =
reinterpret_cast<const unsigned char*>(file_contents.data());
@@ -247,7 +248,7 @@ void ExtensionsDOMHandler::IconLoader::LoadIconsOnFileThread(
base::Base64Encode(file_contents, &base64_encoded);
GURL icon_url("data:image/png;base64," + base64_encoded);
- extension->SetString(L"icon", icon_url.spec());
+ extension->SetString("icon", icon_url.spec());
}
ChromeThread::PostTask(
@@ -346,11 +347,11 @@ void ExtensionsDOMHandler::HandleRequestExtensionsData(const Value* value) {
extension_icons->push_back(PickExtensionIcon(*extension));
}
}
- results->Set(L"extensions", extensions_list);
+ results->Set("extensions", extensions_list);
bool developer_mode = dom_ui_->GetProfile()->GetPrefs()
->GetBoolean(prefs::kExtensionsUIDeveloperMode);
- results->SetBoolean(L"developerMode", developer_mode);
+ results->SetBoolean("developerMode", developer_mode);
if (icon_loader_.get())
icon_loader_->Cancel();
@@ -591,16 +592,17 @@ void ExtensionsDOMHandler::ShowAlert(const std::string& message) {
}
void ExtensionsDOMHandler::HandlePackMessage(const Value* value) {
- std::wstring extension_path;
- std::wstring private_key_path;
+ std::string extension_path;
+ std::string private_key_path;
CHECK(value->IsType(Value::TYPE_LIST));
const ListValue* list = static_cast<const ListValue*>(value);
CHECK(list->GetSize() == 2);
CHECK(list->GetString(0, &extension_path));
CHECK(list->GetString(1, &private_key_path));
- FilePath root_directory = FilePath::FromWStringHack(extension_path);
- FilePath key_file = FilePath::FromWStringHack(private_key_path);
+ FilePath root_directory =
+ FilePath::FromWStringHack(UTF8ToWide(extension_path));
+ FilePath key_file = FilePath::FromWStringHack(UTF8ToWide(private_key_path));
if (root_directory.empty()) {
if (extension_path.empty()) {
@@ -628,14 +630,14 @@ void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file,
const FilePath& pem_file) {
std::string message;
if (!pem_file.empty()) {
- message = WideToUTF8(l10n_util::GetStringF(
+ message = l10n_util::GetStringFUTF8(
IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_NEW,
- crx_file.ToWStringHack(),
- pem_file.ToWStringHack()));
+ WideToUTF16(crx_file.ToWStringHack()),
+ WideToUTF16(pem_file.ToWStringHack()));
} else {
- message = WideToUTF8(l10n_util::GetStringF(
+ message = l10n_util::GetStringFUTF8(
IDS_EXTENSION_PACK_DIALOG_SUCCESS_BODY_UPDATE,
- crx_file.ToWStringHack()));
+ WideToUTF16(crx_file.ToWStringHack()));
}
ShowAlert(message);
@@ -643,8 +645,8 @@ void ExtensionsDOMHandler::OnPackSuccess(const FilePath& crx_file,
dom_ui_->CallJavascriptFunction(L"hidePackDialog", results);
}
-void ExtensionsDOMHandler::OnPackFailure(const std::wstring& error) {
- ShowAlert(WideToUTF8(error));
+void ExtensionsDOMHandler::OnPackFailure(const std::string& error) {
+ ShowAlert(error);
}
void ExtensionsDOMHandler::HandleAutoUpdateMessage(const Value* value) {
@@ -680,9 +682,9 @@ void ExtensionsDOMHandler::HandleSelectFilePathMessage(const Value* value) {
IDS_EXTENSION_PACK_DIALOG_SELECT_KEY);
info.extensions.push_back(std::vector<FilePath::StringType>());
info.extensions.front().push_back(FILE_PATH_LITERAL("pem"));
- info.extension_description_overrides.push_back(WideToUTF16(
- l10n_util::GetString(
- IDS_EXTENSION_PACK_DIALOG_KEY_FILE_TYPE_DESCRIPTION)));
+ info.extension_description_overrides.push_back(
+ l10n_util::GetStringUTF16(
+ IDS_EXTENSION_PACK_DIALOG_KEY_FILE_TYPE_DESCRIPTION));
info.include_all_files = true;
file_type_index = 1;
} else {
@@ -753,7 +755,7 @@ void ExtensionsDOMHandler::MaybeUpdateAfterNotification() {
static void CreateScriptFileDetailValue(
const FilePath& extension_path, const UserScript::FileList& scripts,
- const wchar_t* key, DictionaryValue* script_data) {
+ const char* key, DictionaryValue* script_data) {
if (scripts.empty())
return;
@@ -772,9 +774,9 @@ static void CreateScriptFileDetailValue(
DictionaryValue* ExtensionsDOMHandler::CreateContentScriptDetailValue(
const UserScript& script, const FilePath& extension_path) {
DictionaryValue* script_data = new DictionaryValue();
- CreateScriptFileDetailValue(extension_path, script.js_scripts(), L"js",
+ CreateScriptFileDetailValue(extension_path, script.js_scripts(), "js",
script_data);
- CreateScriptFileDetailValue(extension_path, script.css_scripts(), L"css",
+ CreateScriptFileDetailValue(extension_path, script.css_scripts(), "css",
script_data);
// Get list of glob "matches" strings
@@ -786,7 +788,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateContentScriptDetailValue(
url_pattern_list->Append(new StringValue(url_pattern->GetAsString()));
}
- script_data->Set(L"matches", url_pattern_list);
+ script_data->Set("matches", url_pattern_list);
return script_data;
}
@@ -811,29 +813,29 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
const std::vector<ExtensionPage>& pages, bool enabled) {
DictionaryValue* extension_data = new DictionaryValue();
- extension_data->SetString(L"id", extension->id());
- extension_data->SetString(L"name", extension->name());
- extension_data->SetString(L"description", extension->description());
- extension_data->SetString(L"version", extension->version()->GetString());
- extension_data->SetBoolean(L"enabled", enabled);
- extension_data->SetBoolean(L"enabledIncognito",
+ extension_data->SetString("id", extension->id());
+ extension_data->SetString("name", extension->name());
+ extension_data->SetString("description", extension->description());
+ extension_data->SetString("version", extension->version()->GetString());
+ extension_data->SetBoolean("enabled", enabled);
+ extension_data->SetBoolean("enabledIncognito",
service ? service->IsIncognitoEnabled(extension) : false);
- extension_data->SetBoolean(L"wantsFileAccess",
+ extension_data->SetBoolean("wantsFileAccess",
ExtensionWantsFileAccess(extension));
- extension_data->SetBoolean(L"allowFileAccess",
+ extension_data->SetBoolean("allowFileAccess",
service ? service->AllowFileAccess(extension) : false);
- extension_data->SetBoolean(L"allow_reload",
+ extension_data->SetBoolean("allow_reload",
extension->location() == Extension::LOAD);
// Determine the sort order: Extensions loaded through --load-extensions show
// up at the top. Disabled extensions show up at the bottom.
if (extension->location() == Extension::LOAD)
- extension_data->SetInteger(L"order", 1);
+ extension_data->SetInteger("order", 1);
else
- extension_data->SetInteger(L"order", 2);
+ extension_data->SetInteger("order", 2);
if (!extension->options_url().is_empty())
- extension_data->SetString(L"options_url", extension->options_url().spec());
+ extension_data->SetString("options_url", extension->options_url().spec());
// Add list of content_script detail DictionaryValues.
ListValue *content_script_list = new ListValue();
@@ -843,7 +845,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
content_script_list->Append(
CreateContentScriptDetailValue(*script, extension->path()));
}
- extension_data->Set(L"content_scripts", content_script_list);
+ extension_data->Set("content_scripts", content_script_list);
// Add permissions.
ListValue *permission_list = new ListValue;
@@ -853,7 +855,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
permission_list->Append(Value::CreateStringValue(
permission->GetAsString()));
}
- extension_data->Set(L"permissions", permission_list);
+ extension_data->Set("permissions", permission_list);
// Add views
ListValue* views = new ListValue;
@@ -862,19 +864,19 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
DictionaryValue* view_value = new DictionaryValue;
if (iter->url.scheme() == chrome::kExtensionScheme) {
// No leading slash.
- view_value->SetString(L"path", iter->url.path().substr(1));
+ view_value->SetString("path", iter->url.path().substr(1));
} else {
// For live pages, use the full URL.
- view_value->SetString(L"path", iter->url.spec());
+ view_value->SetString("path", iter->url.spec());
}
- view_value->SetInteger(L"renderViewId", iter->render_view_id);
- view_value->SetInteger(L"renderProcessId", iter->render_process_id);
+ view_value->SetInteger("renderViewId", iter->render_view_id);
+ view_value->SetInteger("renderProcessId", iter->render_process_id);
views->Append(view_value);
}
- extension_data->Set(L"views", views);
- extension_data->SetBoolean(L"hasPopupAction",
+ extension_data->Set("views", views);
+ extension_data->SetBoolean("hasPopupAction",
extension->browser_action() || extension->page_action());
- extension_data->SetString(L"galleryUrl", extension->GalleryUrl().spec());
+ extension_data->SetString("galleryUrl", extension->GalleryUrl().spec());
return extension_data;
}
diff --git a/chrome/browser/extensions/extensions_ui.h b/chrome/browser/extensions/extensions_ui.h
index 9fad351..2bf79e6 100644
--- a/chrome/browser/extensions/extensions_ui.h
+++ b/chrome/browser/extensions/extensions_ui.h
@@ -124,7 +124,7 @@ class ExtensionsDOMHandler
virtual void OnPackSuccess(const FilePath& crx_file,
const FilePath& key_file);
- virtual void OnPackFailure(const std::wstring& message);
+ virtual void OnPackFailure(const std::string& message);
// ExtensionInstallUI::Delegate implementation, used for receiving
// notification about uninstall confirmation dialog selections.
diff --git a/chrome/browser/extensions/pack_extension_job.cc b/chrome/browser/extensions/pack_extension_job.cc
index 01c2fb6..19e26d8 100644
--- a/chrome/browser/extensions/pack_extension_job.cc
+++ b/chrome/browser/extensions/pack_extension_job.cc
@@ -55,5 +55,5 @@ void PackExtensionJob::ReportSuccessOnUIThread() {
void PackExtensionJob::ReportFailureOnUIThread(const std::string& error) {
if (client_)
- client_->OnPackFailure(UTF8ToWide(error));
+ client_->OnPackFailure(error);
}
diff --git a/chrome/browser/extensions/pack_extension_job.h b/chrome/browser/extensions/pack_extension_job.h
index 3c7925c..d3fc223 100644
--- a/chrome/browser/extensions/pack_extension_job.h
+++ b/chrome/browser/extensions/pack_extension_job.h
@@ -23,7 +23,7 @@ class PackExtensionJob : public base::RefCountedThreadSafe<PackExtensionJob> {
public:
virtual void OnPackSuccess(const FilePath& crx_file,
const FilePath& key_file) = 0;
- virtual void OnPackFailure(const std::wstring& message) = 0;
+ virtual void OnPackFailure(const std::string& message) = 0;
protected:
virtual ~Client() {}