Chromium Code Reviews| 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 9a043143cc7d1fcc8cd3d17c6ddec8272421ef3a..fa306f091a6f1124d9bea7595bf751951e99b200 100644 |
| --- a/chrome/browser/resources/options/browser_options.js |
| +++ b/chrome/browser/resources/options/browser_options.js |
| @@ -71,13 +71,17 @@ cr.define('options', function() { |
| $('defaultSearchEngine').onchange = this.setDefaultSearchEngine_; |
| var self = this; |
| - $('instantEnableCheckbox').onclick = function(event) { |
| - if (this.checked && !self.instantConfirmDialogShown_) { |
| - // Leave disabled for now. The PrefCheckbox handler already set it to |
| - // true so undo that. |
| - Preferences.setBooleanPref(this.pref, false, this.metric); |
| - OptionsPage.navigateToPage('instantConfirm'); |
| + $('instantEnabledCheckbox').customChangeHandler = function(event) { |
| + if (this.checked) { |
| + if (self.instantConfirmDialogShown_) { |
|
Evan Stade
2011/07/25 23:01:34
nit: no curlies
sreeram
2011/07/25 23:56:42
Done.
|
| + chrome.send('enableInstant'); |
| + } else { |
| + OptionsPage.navigateToPage('instantConfirm'); |
| + } |
| + } else { |
| + chrome.send('disableInstant'); |
| } |
| + return true; |
| }; |
| Preferences.getInstance().addEventListener('instant.confirm_dialog_shown', |