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

Side by Side Diff: chrome/browser/resources/options/spelling_confirm_overlay.js

Issue 11232046: Add fifth batch of controlled setting indicators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var SettingsDialog = options.SettingsDialog; 6 var SettingsDialog = options.SettingsDialog;
7 7
8 /* 8 /*
9 * SpellingConfirmOverlay class 9 * SpellingConfirmOverlay class
10 * Dialog to confirm that the user really wants to use the Spelling service 10 * Dialog to confirm that the user really wants to use the Spelling service
(...skipping 15 matching lines...) Expand all
26 __proto__: SettingsDialog.prototype, 26 __proto__: SettingsDialog.prototype,
27 27
28 /** @inheritDoc */ 28 /** @inheritDoc */
29 initializePage: function() { 29 initializePage: function() {
30 SettingsDialog.prototype.initializePage.call(this); 30 SettingsDialog.prototype.initializePage.call(this);
31 }, 31 },
32 32
33 /** @inheritDoc */ 33 /** @inheritDoc */
34 handleConfirm: function() { 34 handleConfirm: function() {
35 SettingsDialog.prototype.handleConfirm.call(this); 35 SettingsDialog.prototype.handleConfirm.call(this);
36 Preferences.setBooleanPref('spellcheck.use_spelling_service',
37 true, true);
38 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown', 36 Preferences.setBooleanPref('spellcheck.confirm_dialog_shown',
39 true, true); 37 true, true);
38 var pref = 'spellcheck.use_spelling_service';
39 if (this.confirming_follow_recommendation)
40 Preferences.clearPref(pref, true);
41 else
42 Preferences.setBooleanPref(pref, true, true);
40 }, 43 },
41 44
42 /** @inheritDoc */ 45 /** @inheritDoc */
43 handleCancel: function() { 46 handleCancel: function() {
44 SettingsDialog.prototype.handleCancel.call(this); 47 SettingsDialog.prototype.handleCancel.call(this);
45 $('spelling-enabled-control').checked = false; 48 $('spelling-enabled-control').checked = false;
46 }, 49 },
47 }; 50 };
48 51
49 // Export 52 // Export
50 return { 53 return {
51 SpellingConfirmOverlay: SpellingConfirmOverlay 54 SpellingConfirmOverlay: SpellingConfirmOverlay
52 }; 55 };
53 }); 56 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698