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

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

Issue 953483003: Report promise error-context strings to GA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review 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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/common/js/importer_common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/background/js/import_history.js
diff --git a/ui/file_manager/file_manager/background/js/import_history.js b/ui/file_manager/file_manager/background/js/import_history.js
index 76bacb2847dcdb29f993b44348f2e4d66f5d730f..c5be4bebca63074e8db10ff46f617542b04de106 100644
--- a/ui/file_manager/file_manager/background/js/import_history.js
+++ b/ui/file_manager/file_manager/background/js/import_history.js
@@ -567,7 +567,7 @@ importer.PersistentImportHistory.prototype.markImportedByUrl =
}
return Promise.reject(
- 'Unabled to match destination URL to import record > ' + destinationUrl);
+ 'Unable to match destination URL to import record > ' + destinationUrl);
};
/** @override */
@@ -976,8 +976,12 @@ importer.DriveSyncWatcher.prototype.updateSyncStatus_ =
*/
importer.DriveSyncWatcher.prototype.onFileTransfersUpdated_ =
function(status) {
+ // TODO(smckay): What if the file isn't one we're interested in....?
+ // I guess we just let the call to markImportedByUrl fail for now.
if (status.transferState === 'completed') {
- this.history_.markImportedByUrl(status.fileUrl);
+ this.history_.markImportedByUrl(status.fileUrl)
+ .catch(
+ importer.getLogger().catcher('file-transfer-mark-imported-by-url'));
}
};
« no previous file with comments | « no previous file | ui/file_manager/file_manager/common/js/importer_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698