summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_ui.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 02:39:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 02:39:16 +0000
commit99efb7b19b5ecb8e7f8f3b646f191fda8a756841 (patch)
tree3d569055ca0cfa7a1af56e3226c89927117006b8 /chrome/browser/extensions/extensions_ui.cc
parent4bd50cba12dc8311d3913569c3d43aa64f7312d0 (diff)
downloadchromium_src-99efb7b19b5ecb8e7f8f3b646f191fda8a756841.zip
chromium_src-99efb7b19b5ecb8e7f8f3b646f191fda8a756841.tar.gz
chromium_src-99efb7b19b5ecb8e7f8f3b646f191fda8a756841.tar.bz2
Extensions: file handling clean up.
- remove various invalid uses of ASCII functions - properly escape resource requests - clean up file path handling Some work remains to be done on the last bullet point but this is enough to fix the bug. BUG=30509 TEST=see bug Review URL: http://codereview.chromium.org/501046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34923 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_ui.cc')
-rw-r--r--chrome/browser/extensions/extensions_ui.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc
index a18cb7a..7ddf152 100644
--- a/chrome/browser/extensions/extensions_ui.cc
+++ b/chrome/browser/extensions/extensions_ui.cc
@@ -440,13 +440,12 @@ void ExtensionsDOMHandler::HandleOptionsMessage(const Value* value) {
}
void ExtensionsDOMHandler::HandleLoadMessage(const Value* value) {
- std::string string_path;
+ FilePath::StringType string_path;
CHECK(value->IsType(Value::TYPE_LIST));
const ListValue* list = static_cast<const ListValue*>(value);
CHECK(list->GetSize() == 1) << list->GetSize();
CHECK(list->GetString(0, &string_path));
- FilePath file_path = FilePath::FromWStringHack(ASCIIToWide(string_path));
- extensions_service_->LoadExtension(file_path);
+ extensions_service_->LoadExtension(FilePath(string_path));
}
void ExtensionsDOMHandler::ShowAlert(const std::string& message) {
@@ -653,7 +652,7 @@ DictionaryValue* ExtensionsDOMHandler::CreateExtensionDetailValue(
// 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)
+ if (extension->location() == Extension::LOAD)
extension_data->SetInteger(L"order", 1);
else
extension_data->SetInteger(L"order", 2);