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

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

Issue 11198065: Add fourth batch of controlled setting indicators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 f80232275fd001f9f7bdc9bd025d7ffdcded1a07..f907640264c75c87a1b7f7f4c5325d8dbcf41f01 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -110,7 +110,12 @@ cr.define('options', function() {
// On Startup section.
Preferences.getInstance().addEventListener('session.restore_on_startup',
- this.onRestoreOnStartupChanged_.bind(this));
+ this.onRestoreOnStartupChanged_.bind(this));
+ Preferences.getInstance().addEventListener(
+ 'session.urls_to_restore_on_startup',
+ function(event) {
+ $('startup-set-pages').disabled = event.value.disabled;
+ });
$('startup-set-pages').onclick = function() {
OptionsPage.navigateToPage('startup');
@@ -467,12 +472,8 @@ cr.define('options', function() {
* @private
*/
onRestoreOnStartupChanged_: function(event) {
- /** @const */ var showPagesValue = Number($('startup-show-pages').value);
/** @const */ var showHomePageValue = 0;
- $('startup-set-pages').disabled = event.value.disabled &&
- event.value.value != showPagesValue;
-
if (event.value.value == showHomePageValue) {
// If the user previously selected "Show the homepage", the
// preference will already be migrated to "Open a specific page". So

Powered by Google App Engine
This is Rietveld 408576698