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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 288923004: Add an extension override bubble and warning box for proxy extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 5bbd7f092ee73116bba45cb5cbd71dd6fc6fed03..a0cee2eec9e68f964237881eddeb69501979330a 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -570,6 +570,9 @@ cr.define('options', function() {
this.addExtensionControlledBox_('newtab-section-content',
'newtab-controlled',
false);
+ this.addExtensionControlledBox_('proxy-section-content',
+ 'proxy-controlled',
+ true);
document.body.addEventListener('click', function(e) {
var button = findAncestor(e.target, function(el) {
@@ -1507,9 +1510,7 @@ cr.define('options', function() {
setupProxySettingsSection_: function(disabled, extensionControlled) {
if (!cr.isChromeOS) {
$('proxiesConfigureButton').disabled = disabled;
- $('proxiesLabel').textContent =
- loadTimeData.getString(extensionControlled ?
- 'proxiesLabelExtension' : 'proxiesLabelSystem');
+ $('proxiesLabel').hidden = extensionControlled;
}
},
@@ -1619,6 +1620,15 @@ cr.define('options', function() {
'newtab-controlled',
details.newTabPage.id,
details.newTabPage.name);
+ this.toggleExtensionControlledBox_('proxy-section-content',
+ 'proxy-controlled',
+ details.proxy.id,
+ details.proxy.name);
+
+ // The proxy section contains just the warning box and nothing else, so
+ // if we're hiding the proxy warning box, we should also hide its header
+ // section.
+ $('proxy-section').hidden = details.proxy.id.length == 0;
},

Powered by Google App Engine
This is Rietveld 408576698