| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.personal_options', function() { | 5 cr.define('options.personal_options', function() { |
| 6 const DeletableItem = options.DeletableItem; | 6 const DeletableItem = options.DeletableItem; |
| 7 const DeletableItemList = options.DeletableItemList; | 7 const DeletableItemList = options.DeletableItemList; |
| 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
| 9 | 9 |
| 10 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 return item; | 84 return item; |
| 85 }, | 85 }, |
| 86 | 86 |
| 87 /** @inheritDoc */ | 87 /** @inheritDoc */ |
| 88 deleteItemAtIndex: function(index) { | 88 deleteItemAtIndex: function(index) { |
| 89 ManageProfileOverlay.showDeleteDialog(this.dataModel.item(index)); | 89 ManageProfileOverlay.showDeleteDialog(this.dataModel.item(index)); |
| 90 }, | 90 }, |
| 91 | 91 |
| 92 /** @inheritDoc */ | 92 /** @inheritDoc */ |
| 93 activateItemAtIndex: function(index) { | 93 activateItemAtIndex: function(index) { |
| 94 ManageProfileOverlay.showManageDialog(this.dataModel.item(index)); | 94 // Don't allow the user to edit a profile that is not current. |
| 95 var profileInfo = this.dataModel.item(index); |
| 96 if (profileInfo.isCurrentProfile) |
| 97 ManageProfileOverlay.showManageDialog(profileInfo); |
| 95 }, | 98 }, |
| 96 }; | 99 }; |
| 97 | 100 |
| 98 return { | 101 return { |
| 99 ProfileList: ProfileList | 102 ProfileList: ProfileList |
| 100 }; | 103 }; |
| 101 }); | 104 }); |
| 102 | 105 |
| OLD | NEW |