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

Unified Diff: ui/file_manager/file_manager/background/js/media_import_handler.js

Issue 945933003: Add support for log file rotation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge w/ master. Created 5 years, 10 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: ui/file_manager/file_manager/background/js/media_import_handler.js
diff --git a/ui/file_manager/file_manager/background/js/media_import_handler.js b/ui/file_manager/file_manager/background/js/media_import_handler.js
index 1ccb473db899e88a8940c59915ffb6942bf2a03b..c4041f501cd80475b543785554c5340fdff64031 100644
--- a/ui/file_manager/file_manager/background/js/media_import_handler.js
+++ b/ui/file_manager/file_manager/background/js/media_import_handler.js
@@ -256,7 +256,7 @@ importer.MediaImportHandler.ImportTask.prototype.run = function() {
this.scanResult_.whenFinal()
.then(this.initialize_.bind(this))
.then(this.importScanEntries_.bind(this))
- .catch(importer.getLogger().catcher('import-task-chain'));
+ .catch(importer.getLogger().catcher('import-task-run'));
};
/**
@@ -338,7 +338,13 @@ importer.MediaImportHandler.ImportTask.prototype.importOne_ =
}
}.bind(this))
// Regardless of the result of this copy, push on to the next file.
- .then(completionCallback, completionCallback);
+ .then(completionCallback)
+ .catch(
+ /** @param {*} error */
+ function(error) {
+ importer.getLogger().catcher('import-task-import-one')(error);
+ completionCallback();
+ });
};
/**
@@ -428,7 +434,8 @@ importer.MediaImportHandler.ImportTask.prototype.copy_ =
onComplete.bind(this),
onError.bind(this));
}.bind(this),
- resolver.reject);
+ resolver.reject)
+ .catch(importer.getLogger().catcher('import-task-copy'));
return resolver.promise;
};
@@ -461,7 +468,8 @@ importer.MediaImportHandler.ImportTask.prototype.markAsCopied_ =
entry,
this.destination_,
destinationUrl);
- }.bind(this));
+ }.bind(this))
+ .catch(importer.getLogger().catcher('import-task-mark-as-copied'));
};
/**
@@ -475,7 +483,8 @@ importer.MediaImportHandler.ImportTask.prototype.markAsImported_ =
/** @param {!importer.ImportHistory} history */
function(history) {
history.markImported(entry, this.destination_);
- }.bind(this));
+ }.bind(this))
+ .catch(importer.getLogger().catcher('import-task-mark-as-imported'));
};
/** @private */

Powered by Google App Engine
This is Rietveld 408576698