| Index: chrome/browser/resources/file_manager/js/file_tasks.js
|
| diff --git a/chrome/browser/resources/file_manager/js/file_tasks.js b/chrome/browser/resources/file_manager/js/file_tasks.js
|
| index 374c28cd1e7ec40cdf0e9e97c3525943e4914b53..14717634147b81f413c59d10504e07419175b773 100644
|
| --- a/chrome/browser/resources/file_manager/js/file_tasks.js
|
| +++ b/chrome/browser/resources/file_manager/js/file_tasks.js
|
| @@ -87,36 +87,36 @@ FileTasks.prototype.processTasks_ = function(tasks) {
|
| // Tweak images, titles of internal tasks.
|
| var task_parts = task.taskId.split('|');
|
| if (task_parts[0] == id) {
|
| - if (task_parts[1] == 'play') {
|
| + if (task_parts[2] == 'play') {
|
| // TODO(serya): This hack needed until task.iconUrl is working
|
| // (see GetFileTasksFileBrowserFunction::RunImpl).
|
| task.iconType = 'audio';
|
| task.title = loadTimeData.getString('ACTION_LISTEN');
|
| - } else if (task_parts[1] == 'mount-archive') {
|
| + } else if (task_parts[2] == 'mount-archive') {
|
| task.iconType = 'archive';
|
| task.title = loadTimeData.getString('MOUNT_ARCHIVE');
|
| - } else if (task_parts[1] == 'gallery') {
|
| + } else if (task_parts[2] == 'gallery') {
|
| task.iconType = 'image';
|
| task.title = loadTimeData.getString('ACTION_OPEN');
|
| - } else if (task_parts[1] == 'watch') {
|
| + } else if (task_parts[2] == 'watch') {
|
| task.iconType = 'video';
|
| task.title = loadTimeData.getString('ACTION_WATCH');
|
| - } else if (task_parts[1] == 'open-hosted') {
|
| + } else if (task_parts[2] == 'open-hosted') {
|
| if (this.urls_.length > 1)
|
| task.iconType = 'generic';
|
| else // Use specific icon.
|
| task.iconType = FileType.getIcon(this.urls_[0]);
|
| task.title = loadTimeData.getString('ACTION_OPEN');
|
| - } else if (task_parts[1] == 'view-pdf') {
|
| + } else if (task_parts[2] == 'view-pdf') {
|
| // Do not render this task if disabled.
|
| if (!loadTimeData.getBoolean('PDF_VIEW_ENABLED'))
|
| continue;
|
| task.iconType = 'pdf';
|
| task.title = loadTimeData.getString('ACTION_VIEW');
|
| - } else if (task_parts[1] == 'view-in-browser') {
|
| + } else if (task_parts[2] == 'view-in-browser') {
|
| task.iconType = 'generic';
|
| task.title = loadTimeData.getString('ACTION_VIEW');
|
| - } else if (task_parts[1] == 'install-crx') {
|
| + } else if (task_parts[2] == 'install-crx') {
|
| task.iconType = 'generic';
|
| task.title = loadTimeData.getString('INSTALL_CRX');
|
| } else if (task_parts[1] == 'send-to-drive') {
|
| @@ -191,7 +191,7 @@ FileTasks.prototype.execute_ = function(taskId, opt_urls) {
|
| // For internal tasks we do not listen to the event to avoid
|
| // handling the same task instance from multiple tabs.
|
| // So, we manually execute the task.
|
| - this.executeInternalTask_(task_parts[1], urls);
|
| + this.executeInternalTask_(task_parts[2], urls);
|
| }
|
| }.bind(this));
|
| };
|
|
|