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

Unified Diff: chrome/browser/resources/extensions/extension_loader.js

Issue 422533002: Fix Regression in Unpacked Extension Load Error UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions/extension_loader.js
diff --git a/chrome/browser/resources/extensions/extension_loader.js b/chrome/browser/resources/extensions/extension_loader.js
index 3882a25741c60a9e6448cab8c4ee3a2829591f44..1ed7189ce13582e9a037ec20c9db0fb8483df6c3 100644
--- a/chrome/browser/resources/extensions/extension_loader.js
+++ b/chrome/browser/resources/extensions/extension_loader.js
@@ -16,26 +16,6 @@ cr.define('extensions', function() {
return div;
}
- /**
- * Construct a Failure.
not at google - send to devlin 2014/07/25 16:03:10 what was wrong with a Failure type?
Devlin 2014/07/25 16:15:41 Well, depends on your semantics ;) Since JS is "t
not at google - send to devlin 2014/07/25 16:19:09 if we never constructed a Failure that is a proble
Devlin 2014/07/25 16:22:44 Well, the failure object is primarily constructed
not at google - send to devlin 2014/07/25 16:44:13 Yes I think that would be better. why is it wastef
Devlin 2014/07/25 17:17:25 Because of all the extra work we do to copy those
- * @param {string} filePath The path to the unpacked extension.
- * @param {string} reason The reason the extension failed to load.
- * @param {Object} manifest An object with three strings: beforeHighlight,
- * afterHighlight, and highlight. These represent three portions of the
- * file's content to display - the portion which is most relevant and
- * should be emphasized (highlight), and the parts both before and after
- * this portion. These may be empty.
- * @param {HTMLLIElement} listElement The HTML element used for displaying the
- * failure path for the additional failures UI.
- * @constructor
- */
- function Failure(filePath, reason, manifest, listElement) {
- this.path = filePath;
- this.reason = reason;
- this.manifest = manifest;
- this.listElement = listElement;
- }
-
ExtensionLoadError.prototype = {
__proto__: HTMLDivElement.prototype,
@@ -75,7 +55,16 @@ cr.define('extensions', function() {
/**
* An array of Failures for keeping track of multiple active failures.
- * @type {Array.<Failure>}
+ * Each failure object contains the following:
+ * filePath (string) The path to the unpacked extension.
+ * error (string) The reason the extension failed to load.
+ * manifest (object) An object with three strings: beforeHighlight,
+ * afterHighlight, and highlight. These represent three portions of
+ * the file's content to display - the portion which is most relevant
+ * and should be emphasized (highlight), and the parts both before and
+ * after this portion. These may be empty.
+ * listElement (HTMLLIElement) The HTML element used for displaying the
+ * @type {Array.<Object>}
* @private
*/
this.failures_ = [];
@@ -146,9 +135,9 @@ cr.define('extensions', function() {
assert(this.failures_.length >= 1);
var failure = this.failures_[this.failures_.length - 1];
this.path_.textContent = failure.path;
- this.reason_.textContent = failure.reason;
+ this.reason_.textContent = failure.error;
- failure.manifest.message = failure.reason;
+ failure.manifest.message = failure.error;
this.manifest_.populate(
failure.manifest,
loadTimeData.getString('extensionLoadCouldNotLoadManifest'));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698