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 cb4f5cb8ecfcff3008b2b8dd3e9fa87199bb3b1b..d8ffb8230c1748be9f4c99700102891da1508085 100644 |
--- a/chrome/browser/resources/file_manager/foreground/js/file_manager.js |
+++ b/chrome/browser/resources/file_manager/foreground/js/file_manager.js |
@@ -399,6 +399,26 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52; |
this.blinkSelection.bind(this)); |
controller.addEventListener('selection-cut', |
this.blinkSelection.bind(this)); |
+ controller.addEventListener('source-not-found', |
+ this.onSourceNotFound_.bind(this)); |
+ }; |
+ |
+ /** |
+ * Handles an error that the source entry of file operation is not found. |
+ * @private |
+ */ |
+ FileManager.prototype.onSourceNotFound_ = function(event) { |
+ // Ensure this.sourceNotFoundErrorCount_ is integer. |
+ this.sourceNotFoundErrorCount_ = ~~this.sourceNotFoundErrorCount_; |
+ var item = new ProgressCenterItem(); |
+ item.id = 'source-not-found-' + this.sourceNotFoundErrorCount_; |
+ if (event.progressType === ProgressItemType.COPY) |
+ item.message = strf('COPY_SOURCE_NOT_FOUND_ERROR', event.fileName); |
+ else if (event.progressType === ProgressItemType.MOVE) |
+ item.message = strf('MOVE_SOURCE_NOT_FOUND_ERROR', event.fileName); |
+ item.state = ProgressItemState.ERROR; |
+ this.backgroundPage_.background.progressCenter.updateItem(item); |
+ this.sourceNotFoundErrorCount_++; |
}; |
/** |