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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/file_manager.js

Issue 109143005: Files.app: Fix a call of the default task picker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years 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/chromeos/extensions/file_manager/private_api_tasks.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/foreground/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/file_manager.js b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
index 6bfbd155adfad36bf91292b16aef1af9fc079646..c8503fac9b51a9b11e4332f61a021a046d42bb72 100644
--- a/chrome/browser/resources/file_manager/foreground/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/foreground/js/file_manager.js
@@ -1751,8 +1751,8 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
} else {
var extensions = [];
- for (var i = 0; i < selection.urls.length; i++) {
- var match = /\.(\w+)$/g.exec(selection.urls[i]);
+ for (var i = 0; i < selection.entries.length; i++) {
+ var match = /\.(\w+)$/g.exec(selection.entries[i].toURL());
if (match) {
var ext = match[1].toUpperCase();
if (extensions.indexOf(ext) == -1) {
@@ -1775,7 +1775,6 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
}
};
-
/**
* Sets the given task as default, when this task is applicable.
*
@@ -1785,8 +1784,10 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
FileManager.prototype.onDefaultTaskDone_ = function(task) {
// TODO(dgozman): move this method closer to tasks.
var selection = this.getSelection();
- chrome.fileBrowserPrivate.setDefaultTask(task.taskId,
- selection.urls, selection.mimeTypes);
+ chrome.fileBrowserPrivate.setDefaultTask(
+ task.taskId,
+ util.entriesToURLs(selection.entries),
+ selection.mimeTypes);
selection.tasks = new FileTasks(this);
selection.tasks.init(selection.entries, selection.mimeTypes);
selection.tasks.display(this.taskItems_);
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698