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

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

Issue 10836031: Remove Instant v1 API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update history, title, favicon Created 8 years, 4 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/options2/browser_options.js
diff --git a/chrome/browser/resources/options2/browser_options.js b/chrome/browser/resources/options2/browser_options.js
index de622928431c35b2232210c16c487960b6f33901..e0acdb745c6da8bcccdded3af1c293138a8b7fa6 100644
--- a/chrome/browser/resources/options2/browser_options.js
+++ b/chrome/browser/resources/options2/browser_options.js
@@ -170,15 +170,11 @@ cr.define('options', function() {
$('default-search-engine').addEventListener('change',
this.setDefaultSearchEngine_);
$('instant-enabled-control').customChangeHandler = function(event) {
- if (this.checked) {
- if (self.instantConfirmDialogShown_)
- chrome.send('enableInstant');
- else
- OptionsPage.showPageByName('instantConfirm', false);
- } else {
- chrome.send('disableInstant');
+ if (this.checked && !self.instantConfirmDialogShown_) {
+ OptionsPage.showPageByName('instantConfirm', false);
+ return true; // Stop default preference processing.
}
- return true;
+ return false; // Allow default preference processing.
};
Preferences.getInstance().addEventListener('instant.confirm_dialog_shown',
this.onInstantConfirmDialogShownChanged_.bind(this));

Powered by Google App Engine
This is Rietveld 408576698