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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_tasks.js

Issue 821003002: Files.app: Fix TaskController so that it calls correct default task. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Licence Created 6 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
Index: ui/file_manager/file_manager/foreground/js/file_tasks.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_tasks.js b/ui/file_manager/file_manager/foreground/js/file_tasks.js
index fdd285e50b3d0dc9ad8a85f94a655412c93e60eb..c2d97a63b64fa0dd9f3f57a258d065ad3eced0b1 100644
--- a/ui/file_manager/file_manager/foreground/js/file_tasks.js
+++ b/ui/file_manager/file_manager/foreground/js/file_tasks.js
@@ -94,6 +94,7 @@ FileTasks.createWebStoreLink = function(extension, mimeType) {
*
* @param {Array.<Entry>} entries List of file entries.
* @param {Array.<string>=} opt_mimeTypes Mime-type specified for each entries.
+ * @return {!Promise} Promise to be fulfilled when the initialization completes.
*/
FileTasks.prototype.init = function(entries, opt_mimeTypes) {
this.entries_ = entries;
@@ -232,16 +233,6 @@ FileTasks.isInternalTask_ = function(taskId) {
FileTasks.prototype.processTasks_ = function(tasks) {
this.tasks_ = [];
var id = chrome.runtime.id;
- var isOnDrive = false;
- var fm = this.fileManager_;
- for (var index = 0; index < this.entries_.length; ++index) {
- var locationInfo = fm.volumeManager.getLocationInfo(this.entries_[index]);
- if (locationInfo && locationInfo.isDriveBased) {
- isOnDrive = true;
- break;
- }
- }
-
for (var i = 0; i < tasks.length; i++) {
var task = tasks[i];
var taskParts = task.taskId.split('|');
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | ui/file_manager/file_manager/foreground/js/main_scripts.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698