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

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

Issue 22938005: Add ErrorConsole UI for Extension Install Warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_ec_install_warnings
Patch Set: License Created 7 years, 3 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: chrome/browser/resources/extensions/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index 605c81015156ad128fc3c3f528dce5382e45d985..ec0b53e578e8b12f2296b3883925af97f15e0bf1 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -2,22 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+<include src="extension_error.js"></include>
+
cr.define('options', function() {
'use strict';
/**
- * A lookup helper function to find the first node that has an id (starting
- * at |node| and going up the parent chain).
- * @param {Element} node The node to start looking at.
- */
- function findIdNode(node) {
- while (node && !node.id) {
- node = node.parentNode;
- }
- return node;
- }
-
- /**
* Creates a new list of extensions.
* @param {Object=} opt_propertyBag Optional properties.
* @constructor
@@ -315,8 +305,14 @@ cr.define('options', function() {
});
}
- // The install warnings.
- if (extension.installWarnings) {
+ // The manifest errors and warnings, in one of two formats (depending on
+ // if the ErrorConsole is enabled).
+ if (extension.manifestErrors) {
+ var manifestErrors = node.querySelector('.manifest-errors');
+ manifestErrors.hidden = false;
+ manifestErrors.appendChild(
+ new extensions.ExtensionErrorList(extension.manifestErrors));
+ } else if (extension.installWarnings) {
var panel = node.querySelector('.install-warnings');
panel.hidden = false;
var list = panel.querySelector('ul');
@@ -337,7 +333,7 @@ cr.define('options', function() {
topScroll -= pad / 2;
document.body.scrollTop = topScroll;
}
- }
+ },
};
return {
« no previous file with comments | « chrome/browser/resources/extensions/extension_error_overlay.js ('k') | chrome/browser/resources/extensions/extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698