Commit 461b5b81 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

Content metadata provider: shorten |errorDescription| to |cause|

Says as much but avoids an unfortunate auto-formatter line break. Also
remove a comment that no longer matches the error code behavior.

Bug: 1114622
Change-Id: If495124221d6bbeb416cb69a1a4b30fc6d95f1d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2377827
Commit-Queue: Noel Gordon <noel@chromium.org>
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#802093}
parent 44036b56
...@@ -371,14 +371,12 @@ class ContentMetadataProvider extends MetadataProvider { ...@@ -371,14 +371,12 @@ class ContentMetadataProvider extends MetadataProvider {
* Returns an 'error' MetadataItem. * Returns an 'error' MetadataItem.
* @param {string} url File entry. * @param {string} url File entry.
* @param {string} step Step that failed. * @param {string} step Step that failed.
* @param {string} errorDescription Error description. * @param {string} cause Error cause.
* @return {!MetadataItem} Error metadata * @return {!MetadataItem} Error metadata
* @private * @private
*/ */
createError_(url, step, errorDescription) { createError_(url, step, cause) {
// For error case, fill all fields with error object. const error = new ContentMetadataProvider.Error(url, step, cause);
const error =
new ContentMetadataProvider.Error(url, step, errorDescription);
const item = new MetadataItem(); const item = new MetadataItem();
item.contentImageTransformError = error; item.contentImageTransformError = error;
item.contentThumbnailTransformError = error; item.contentThumbnailTransformError = error;
...@@ -394,10 +392,10 @@ ContentMetadataProvider.Error = class extends Error { ...@@ -394,10 +392,10 @@ ContentMetadataProvider.Error = class extends Error {
/** /**
* @param {string} url File Entry. * @param {string} url File Entry.
* @param {string} step Step that failed. * @param {string} step Step that failed.
* @param {string} errorDescription Error description. * @param {string} cause Error cause.
*/ */
constructor(url, step, errorDescription) { constructor(url, step, cause) {
super(errorDescription); super(cause);
/** @public @const {string} */ /** @public @const {string} */
this.url = url; this.url = url;
...@@ -406,7 +404,7 @@ ContentMetadataProvider.Error = class extends Error { ...@@ -406,7 +404,7 @@ ContentMetadataProvider.Error = class extends Error {
this.step = step; this.step = step;
/** @public @const {string} */ /** @public @const {string} */
this.errorDescription = errorDescription; this.errorDescription = cause;
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment