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

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: Removed two obsoleted test cases. 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 4698e563d59078a3f15638fc725e7d61109d917b..2cad57c18e0e449711bd756ad22f5ad0317caa2b 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
« no previous file with comments | « chrome/browser/resources/options/browser_options.html ('k') | chrome/browser/resources/options/startup_section.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698