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

Unified Diff: chrome/browser/extensions/extensions_ui.cc

Issue 256022: Loads local resources from current locale subtree if available, if not it fal... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/file_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_ui.cc
===================================================================
--- chrome/browser/extensions/extensions_ui.cc (revision 28272)
+++ chrome/browser/extensions/extensions_ui.cc (working copy)
@@ -239,15 +239,11 @@
ListValue *list = new ListValue();
for (size_t i = 0; i < scripts.size(); ++i) {
- const UserScript::File &file = scripts[i];
- // We are passing through GURLs to canonicalize the output to a valid
- // URL path fragment.
- GURL script_url = net::FilePathToFileURL(file.path());
- GURL extension_url = net::FilePathToFileURL(extension_path);
- std::string relative_path =
- script_url.spec().substr(extension_url.spec().length() + 1);
-
- list->Append(new StringValue(relative_path));
+ const UserScript::File& file = scripts[i];
+ // TODO(cira): this information is not used on extension page yet. We
+ // may want to display actual resource that got loaded, not default.
+ list->Append(
+ new StringValue(file.resource().relative_path().value()));
}
script_data->Set(key, list);
}
@@ -292,8 +288,8 @@
UserScriptList content_scripts = extension->content_scripts();
for (UserScriptList::const_iterator script = content_scripts.begin();
script != content_scripts.end(); ++script) {
- content_script_list->Append(CreateContentScriptDetailValue(*script,
- extension->path()));
+ content_script_list->Append(
+ CreateContentScriptDetailValue(*script, extension->path()));
}
extension_data->Set(L"content_scripts", content_script_list);
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/file_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698