Chromium Code Reviews| 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..041f82fa567952179a678c487217d56b26272593 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,25 @@ 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) { |
| + this.sourceNotFoundErrorCount_ = this.sourceNotFoundErrorCount_ || 0; |
| + var item = new ProgressCenterItem(); |
| + item.id = 'source-not-found-' + this.sourceNotFoundErrorCount_; |
|
yoshiki
2014/02/14 10:24:11
Please make it sure that sourceNotFoundErrorCount
hirono
2014/02/14 10:42:37
Done.
|
| + 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_++; |
| }; |
| /** |