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 7ac6f17a521471c5f2ae3434dac3c0ee82a70698..26e44090b33eac97f483bd5306072b384854ac5a 100644 |
--- a/chrome/browser/resources/options/browser_options.js |
+++ b/chrome/browser/resources/options/browser_options.js |
@@ -158,6 +158,19 @@ cr.define('options', function() { |
}; |
$('default-search-engine').addEventListener('change', |
this.setDefaultSearchEngine_); |
+ if (loadTimeData.getValue('instant_extended')) { |
+ // The control must be duplicated because we can't change the pref |
+ // attribute here, it would be too late, since the value is initialized |
+ // earlier using the original pref name, so we swap the controls. |
+ $('instant-enabled-control').hidden = true; |
+ $('instant-extended-enabled-control').hidden = false; |
+ // For the other elements, we can simply modify them here as follows. |
+ $('instant-enabled-indicator').removeAttribute('dialog-pref'); |
+ $('instant-enabled-control').setAttribute('pref', |
+ 'instant_extended.enabled'); |
+ $('instant-enabled-control-label').setAttribute( |
+ 'for', 'instant-extended-enabled-control'); |
+ } |
// Users section. |
if (loadTimeData.valueExists('profilesInfo')) { |