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

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

Issue 11232059: Clean up copy&paste in confirmation dialogs for prefs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit addressed. Created 8 years, 2 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 8314ee3371f8c3b2856e959f5d43f8d505fcecb7..94b268c5f13a5e4982e1c4ea2dfff72a6d547484 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -25,20 +25,6 @@ cr.define('options', function() {
syncSetupCompleted: false,
/**
- * The cached value of the instant.confirm_dialog_shown preference.
- * @type {bool}
- * @private
- */
- instantConfirmDialogShown_: false,
-
- /**
- * The cached value of the spellcheck.confirm_dialog_shown preference.
- * @type {bool}
- * @private
- */
- spellcheckConfirmDialogShown_: false,
-
- /**
* Keeps track of whether |onShowHomeButtonChanged_| has been called. See
* |onShowHomeButtonChanged_|.
* @type {bool}
@@ -165,15 +151,6 @@ cr.define('options', function() {
};
$('default-search-engine').addEventListener('change',
this.setDefaultSearchEngine_);
- $('instant-enabled-control').customChangeHandler = function(event) {
- if (this.checked && !self.instantConfirmDialogShown_) {
- OptionsPage.showPageByName('instantConfirm', false);
- return true; // Stop default preference processing.
- }
- return false; // Allow default preference processing.
- };
- Preferences.getInstance().addEventListener('instant.confirm_dialog_shown',
- this.onInstantConfirmDialogShownChanged_.bind(this));
// Users section.
if (loadTimeData.valueExists('profilesInfo')) {
@@ -251,20 +228,6 @@ cr.define('options', function() {
OptionsPage.navigateToPage('clearBrowserData');
chrome.send('coreOptionsUserMetricsAction', ['Options_ClearData']);
};
- // 'spelling-enabled-control' element is only present on Chrome branded
- // builds.
- if ($('spelling-enabled-control')) {
- $('spelling-enabled-control').customChangeHandler = function(event) {
- if (this.checked && !self.spellcheckConfirmDialogShown_) {
- OptionsPage.showPageByName('spellingConfirm', false);
- return true;
- }
- return false;
- };
- Preferences.getInstance().addEventListener(
- 'spellcheck.confirm_dialog_shown',
- this.onSpellcheckConfirmDialogShownChanged_.bind(this));
- }
// 'metricsReportingEnabled' element is only present on Chrome branded
// builds.
if ($('metricsReportingEnabled')) {
@@ -273,13 +236,6 @@ cr.define('options', function() {
[String(event.target.checked)]);
};
}
- $('do-not-track-enabled').customChangeHandler = function(event) {
- if (this.checked) {
- OptionsPage.showPageByName('doNotTrackConfirm', false);
- return true;
- }
- return false;
- };
// Bluetooth (CrOS only).
if (cr.isChromeOS) {
@@ -737,26 +693,6 @@ cr.define('options', function() {
},
/**
- * Called when the value of the instant.confirm_dialog_shown preference
- * changes. Cache this value.
- * @param {Event} event Change event.
- * @private
- */
- onInstantConfirmDialogShownChanged_: function(event) {
- this.instantConfirmDialogShown_ = event.value.value;
- },
-
- /**
- * Called when the value of the spellcheck.confirm_dialog_shown preference
- * changes. Cache this value.
- * @param {Event} event Change event.
- * @private
- */
- onSpellcheckConfirmDialogShownChanged_: function(event) {
- this.spellcheckConfirmDialogShown_ = event.value.value;
- },
-
- /**
* Called when the value of the download.default_directory preference
* changes.
* @param {Event} event Change event.
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/resources/options/confirm_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698