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 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
10 | 10 |
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 * @return {Object} A profile info object. | 1330 * @return {Object} A profile info object. |
1331 * @private | 1331 * @private |
1332 */ | 1332 */ |
1333 getCurrentProfile_: function() { | 1333 getCurrentProfile_: function() { |
1334 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { | 1334 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { |
1335 var profile = $('profiles-list').dataModel.item(i); | 1335 var profile = $('profiles-list').dataModel.item(i); |
1336 if (profile.isCurrentProfile) | 1336 if (profile.isCurrentProfile) |
1337 return profile; | 1337 return profile; |
1338 } | 1338 } |
1339 | 1339 |
1340 assert(false, | 1340 notReached('There should always be a current profile, but none found.'); |
1341 'There should always be a current profile, but none found.'); | |
1342 }, | 1341 }, |
1343 | 1342 |
1344 /** | 1343 /** |
1345 * Propmpts user to confirm deletion of the profile for this browser | 1344 * Propmpts user to confirm deletion of the profile for this browser |
1346 * window. | 1345 * window. |
1347 * @private | 1346 * @private |
1348 */ | 1347 */ |
1349 deleteCurrentProfile_: function() { | 1348 deleteCurrentProfile_: function() { |
1350 ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_()); | 1349 ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_()); |
1351 }, | 1350 }, |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1887 $('consumer-management-unenroll').hidden = !isEnrolled; | 1886 $('consumer-management-unenroll').hidden = !isEnrolled; |
1888 ConsumerManagementOverlay.setEnrollmentStatus(isEnrolled); | 1887 ConsumerManagementOverlay.setEnrollmentStatus(isEnrolled); |
1889 }; | 1888 }; |
1890 } | 1889 } |
1891 | 1890 |
1892 // Export | 1891 // Export |
1893 return { | 1892 return { |
1894 BrowserOptions: BrowserOptions | 1893 BrowserOptions: BrowserOptions |
1895 }; | 1894 }; |
1896 }); | 1895 }); |
OLD | NEW |