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

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

Issue 10914075: [filemanager] Implementing undo delete functionality. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge to head Created 8 years, 3 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
Index: chrome/browser/resources/file_manager/js/directory_model.js
===================================================================
--- chrome/browser/resources/file_manager/js/directory_model.js (revision 155363)
+++ chrome/browser/resources/file_manager/js/directory_model.js (working copy)
@@ -496,42 +496,6 @@
};
/**
- * Delete the list of files and directories from filesystem and
- * update the file list.
- * @param {Array.<Entry>} entries Entries to delete.
- * @param {function()=} opt_callback Called when finished.
- */
-DirectoryModel.prototype.deleteEntries = function(entries, opt_callback) {
- var downcount = entries.length + 1;
- var currentDirPath = this.getCurrentDirPath();
-
- var onComplete = opt_callback ? function() {
- if (--downcount == 0)
- opt_callback();
- } : function() {};
-
- var fileList = this.getFileList();
- for (var i = 0; i < entries.length; i++) {
- var entry = entries[i];
-
- var onSuccess = function(removedEntry) {
- if (currentDirPath == this.getCurrentDirPath()) {
- var index = fileList.indexOf(removedEntry);
- if (index >= 0)
- fileList.splice(index, 1);
- }
- onComplete();
- }.bind(this, entry);
-
- util.removeFileOrDirectory(
- entry,
- onSuccess,
- util.flog('Error deleting ' + entry.fullPath, onComplete));
- }
- onComplete();
-};
-
-/**
* @param {string} name Filename.
*/
DirectoryModel.prototype.onEntryChanged = function(name) {

Powered by Google App Engine
This is Rietveld 408576698