| 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 | 8 |
| 9 /** | 9 /** |
| 10 * ManageProfileOverlay class | 10 * ManageProfileOverlay class |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 * Called when the user clicks "OK" or hits enter. Saves the newly changed | 396 * Called when the user clicks "OK" or hits enter. Saves the newly changed |
| 397 * profile info. | 397 * profile info. |
| 398 * @private | 398 * @private |
| 399 */ | 399 */ |
| 400 submitManageChanges_: function() { | 400 submitManageChanges_: function() { |
| 401 var name = $('manage-profile-name').value; | 401 var name = $('manage-profile-name').value; |
| 402 var iconURL = $('manage-profile-icon-grid').selectedItem; | 402 var iconURL = $('manage-profile-icon-grid').selectedItem; |
| 403 | 403 |
| 404 chrome.send('setProfileIconAndName', | 404 chrome.send('setProfileIconAndName', |
| 405 [this.profileInfo_.filePath, iconURL, name]); | 405 [this.profileInfo_.filePath, iconURL, name]); |
| 406 if (name != this.profileInfo_.name) |
| 407 options.ManagedUserListData.reloadExistingManagedUsers(); |
| 406 }, | 408 }, |
| 407 | 409 |
| 408 /** | 410 /** |
| 409 * Called when the user clicks "OK" or hits enter. Creates the profile | 411 * Called when the user clicks "OK" or hits enter. Creates the profile |
| 410 * using the information in the dialog. | 412 * using the information in the dialog. |
| 411 * @private | 413 * @private |
| 412 */ | 414 */ |
| 413 submitCreateProfile_: function() { | 415 submitCreateProfile_: function() { |
| 414 // This is visual polish: the UI to access this should be disabled for | 416 // This is visual polish: the UI to access this should be disabled for |
| 415 // managed users, and the back end will prevent user creation anyway. | 417 // managed users, and the back end will prevent user creation anyway. |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 return instance[name + '_'].apply(instance, arguments); | 783 return instance[name + '_'].apply(instance, arguments); |
| 782 }; | 784 }; |
| 783 }); | 785 }); |
| 784 | 786 |
| 785 // Export | 787 // Export |
| 786 return { | 788 return { |
| 787 ManageProfileOverlay: ManageProfileOverlay, | 789 ManageProfileOverlay: ManageProfileOverlay, |
| 788 CreateProfileOverlay: CreateProfileOverlay, | 790 CreateProfileOverlay: CreateProfileOverlay, |
| 789 }; | 791 }; |
| 790 }); | 792 }); |
| OLD | NEW |