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

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

Issue 238073002: Provide UI for per-extension enabling/disabling of error collection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed pref map for Ben Created 6 years, 8 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 f21d865d7a78bea2c1b9fe0172c9d5ed9955d465..a3b02a57f5bf4ad81cfcf91829e408b627cc1ac4 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -148,6 +148,20 @@ cr.define('options', function() {
var butterBar = node.querySelector('.butter-bar');
butterBar.hidden = !butterBarVisibility[extension.id];
+ // The 'collect errors' checkbox. This should only be visible if the
+ // error console is enabled - we can detect this by the existence of the
+ // |errorCollectionEnabled| property.
+ if (extension.wantsErrorCollection) {
+ node.querySelector('.error-collection-control').hidden = false;
+ var errorCollection =
+ node.querySelector('.error-collection-control input');
+ errorCollection.checked = extension.errorCollectionEnabled;
+ errorCollection.addEventListener('change', function(e) {
+ chrome.send('extensionSettingsEnableErrorCollection',
+ [extension.id, String(e.target.checked)]);
+ });
+ }
+
// The 'allow file:// access' checkbox.
if (extension.wantsFileAccess) {
var fileAccess = node.querySelector('.file-access-control');

Powered by Google App Engine
This is Rietveld 408576698