Commit d5518958 authored by qghc36@motorola.com's avatar qghc36@motorola.com

Options: Fix to enable "Use current pages" to make new URLs to open when chrome restarts.

Made changes to enable the button only on below conditions
1) If pref is user editable. In this case event.value['disabled'] would be false.
2) If pref is user editable and it does'nt hold a default value. In this case event.value['controlledBy'] would be recommended.
3) Otherwise if controlledBy is empty or null.

BUG=106592
TEST=None.


Review URL: http://codereview.chromium.org/8883015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113975 0039d316-1c4b-4281-b951-d872f2087c98
parent f1e969da
...@@ -24,7 +24,7 @@ cr.define('options', function() { ...@@ -24,7 +24,7 @@ cr.define('options', function() {
startup_pages_pref_: { startup_pages_pref_: {
'name': 'session.urls_to_restore_on_startup', 'name': 'session.urls_to_restore_on_startup',
'managed': false 'disabled': false
}, },
/** /**
...@@ -247,7 +247,7 @@ cr.define('options', function() { ...@@ -247,7 +247,7 @@ cr.define('options', function() {
*/ */
shouldEnableCustomStartupPageControls: function(pages) { shouldEnableCustomStartupPageControls: function(pages) {
return $('startupShowPagesButton').checked && return $('startupShowPagesButton').checked &&
!this.startup_pages_pref_.controlledBy; !this.startup_pages_pref_.disabled;
}, },
/** /**
...@@ -288,7 +288,7 @@ cr.define('options', function() { ...@@ -288,7 +288,7 @@ cr.define('options', function() {
* @private * @private
*/ */
handleStartupPageListChange_: function(event) { handleStartupPageListChange_: function(event) {
this.startup_pages_pref_.controlledBy = event.value['controlledBy']; this.startup_pages_pref_.disabled = event.value['disabled'];
this.updateCustomStartupPageControlStates_(); this.updateCustomStartupPageControlStates_();
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment