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

Side by Side Diff: chrome/browser/resources/extensions/extension_list.js

Issue 93513006: Allow re-enabling of DISABLE_NOT_VERIFIED extensions if appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 <include src="extension_error.js"></include> 5 <include src="extension_error.js"></include>
6 6
7 cr.define('options', function() { 7 cr.define('options', function() {
8 'use strict'; 8 'use strict';
9 9
10 /** 10 /**
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 '.extension-list-item-wrapper'); 81 '.extension-list-item-wrapper');
82 var node = template.cloneNode(true); 82 var node = template.cloneNode(true);
83 node.id = extension.id; 83 node.id = extension.id;
84 84
85 if (!extension.enabled || extension.terminated) 85 if (!extension.enabled || extension.terminated)
86 node.classList.add('inactive-extension'); 86 node.classList.add('inactive-extension');
87 87
88 if (extension.managedInstall) { 88 if (extension.managedInstall) {
89 node.classList.add('may-not-modify'); 89 node.classList.add('may-not-modify');
90 node.classList.add('may-not-remove'); 90 node.classList.add('may-not-remove');
91 } else if (extension.suspiciousInstall) {
92 node.classList.add('may-not-modify');
Finnur 2013/12/11 17:28:20 Wait... why is this necessary? Doesn't it undo wha
asargent_no_longer_on_chrome 2013/12/11 21:26:05 The problem is that if for some reason we got the
Finnur 2013/12/11 21:46:31 OK. For anyone reading at home we had a hangout wh
93 } 91 }
94 92
95 var idToHighlight = this.getIdQueryParam_(); 93 var idToHighlight = this.getIdQueryParam_();
96 if (node.id == idToHighlight) 94 if (node.id == idToHighlight)
97 node.classList.add('extension-highlight'); 95 node.classList.add('extension-highlight');
98 96
99 var item = node.querySelector('.extension-list-item'); 97 var item = node.querySelector('.extension-list-item');
100 // Prevent the image cache of extension icon by using the reloaded 98 // Prevent the image cache of extension icon by using the reloaded
101 // timestamp as a query string. The timestamp is recorded when the user 99 // timestamp as a query string. The timestamp is recorded when the user
102 // clicks the 'Reload' link. http://crbug.com/159302. 100 // clicks the 'Reload' link. http://crbug.com/159302.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 chrome.send('extensionSettingsLaunch', [extension.id]); 197 chrome.send('extensionSettingsLaunch', [extension.id]);
200 }); 198 });
201 launch.hidden = false; 199 launch.hidden = false;
202 } 200 }
203 } 201 }
204 202
205 if (!extension.terminated) { 203 if (!extension.terminated) {
206 // The 'Enabled' checkbox. 204 // The 'Enabled' checkbox.
207 var enable = node.querySelector('.enable-checkbox'); 205 var enable = node.querySelector('.enable-checkbox');
208 enable.hidden = false; 206 enable.hidden = false;
209 enable.querySelector('input').disabled = extension.managedInstall || 207 enable.querySelector('input').disabled = extension.managedInstall;
210 extension.suspiciousInstall;
211 208
212 if (!extension.managedInstall && !extension.suspiciousInstall) { 209 if (!extension.managedInstall) {
213 enable.addEventListener('click', function(e) { 210 enable.addEventListener('click', function(e) {
214 // When e.target is the label instead of the checkbox, it doesn't 211 // When e.target is the label instead of the checkbox, it doesn't
215 // have the checked property and the state of the checkbox is 212 // have the checked property and the state of the checkbox is
216 // left unchanged. 213 // left unchanged.
217 var checked = e.target.checked; 214 var checked = e.target.checked;
218 if (checked == undefined) 215 if (checked == undefined)
219 checked = !e.currentTarget.querySelector('input').checked; 216 checked = !e.currentTarget.querySelector('input').checked;
220 chrome.send('extensionSettingsEnable', 217 chrome.send('extensionSettingsEnable',
221 [extension.id, checked ? 'true' : 'false']); 218 [extension.id, checked ? 'true' : 'false']);
222 219
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 topScroll -= pad / 2; 345 topScroll -= pad / 2;
349 setScrollTopForDocument(document, topScroll); 346 setScrollTopForDocument(document, topScroll);
350 } 347 }
351 }, 348 },
352 }; 349 };
353 350
354 return { 351 return {
355 ExtensionsList: ExtensionsList 352 ExtensionsList: ExtensionsList
356 }; 353 };
357 }); 354 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698