OLD | NEW |
---|---|
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 OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
9 | 9 |
10 // | 10 // |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 this.setDefaultSearchEngine_); | 160 this.setDefaultSearchEngine_); |
161 if (loadTimeData.getValue('instant_enabled') == | 161 if (loadTimeData.getValue('instant_enabled') == |
162 'instant_extended.enabled') { | 162 'instant_extended.enabled') { |
163 // We don't want to see the confirm dialog for instant extended. | 163 // We don't want to see the confirm dialog for instant extended. |
164 $('instant-enabled-control').removeAttribute('dialog-pref'); | 164 $('instant-enabled-control').removeAttribute('dialog-pref'); |
165 $('instant-enabled-indicator').removeAttribute('dialog-pref'); | 165 $('instant-enabled-indicator').removeAttribute('dialog-pref'); |
166 // And we want to upload a different metric name. | 166 // And we want to upload a different metric name. |
167 $('instant-enabled-control').setAttribute( | 167 $('instant-enabled-control').setAttribute( |
168 'metric', 'Options_InstantExtendedEnabled'); | 168 'metric', 'Options_InstantExtendedEnabled'); |
169 } | 169 } |
170 // We need to set the starting value for the instant checkbox as | |
171 // it may be different from the value of the preference. | |
Mattias Nissler (ping if slow)
2013/02/25 18:53:41
If the instant_enabled is set to the right pref na
| |
172 if (loadTimeData.getValue('instant_starting_value')) { | |
173 $('instant-enabled-control').setAttribute('checked', 'true'); | |
174 } else { | |
175 $('instant-enabled-control').setAttribute('checked', 'false'); | |
176 } | |
170 | 177 |
171 // Users section. | 178 // Users section. |
172 if (loadTimeData.valueExists('profilesInfo')) { | 179 if (loadTimeData.valueExists('profilesInfo')) { |
173 $('profiles-section').hidden = false; | 180 $('profiles-section').hidden = false; |
174 | 181 |
175 var profilesList = $('profiles-list'); | 182 var profilesList = $('profiles-list'); |
176 options.browser_options.ProfileList.decorate(profilesList); | 183 options.browser_options.ProfileList.decorate(profilesList); |
177 profilesList.autoExpands = true; | 184 profilesList.autoExpands = true; |
178 | 185 |
179 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); | 186 this.setProfilesInfo_(loadTimeData.getValue('profilesInfo')); |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1420 BrowserOptions.getLoggedInUsername = function() { | 1427 BrowserOptions.getLoggedInUsername = function() { |
1421 return BrowserOptions.getInstance().username_; | 1428 return BrowserOptions.getInstance().username_; |
1422 }; | 1429 }; |
1423 } | 1430 } |
1424 | 1431 |
1425 // Export | 1432 // Export |
1426 return { | 1433 return { |
1427 BrowserOptions: BrowserOptions | 1434 BrowserOptions: BrowserOptions |
1428 }; | 1435 }; |
1429 }); | 1436 }); |
OLD | NEW |