Index: chrome/browser/resources/options/manage_profile_overlay.js |
diff --git a/chrome/browser/resources/options/manage_profile_overlay.js b/chrome/browser/resources/options/manage_profile_overlay.js |
index f9cf0767e7fc9683ece7d15ab6aca26ce0d5927c..03abb4994c11da286b15189f873a32a42f5be576 100644 |
--- a/chrome/browser/resources/options/manage_profile_overlay.js |
+++ b/chrome/browser/resources/options/manage_profile_overlay.js |
@@ -67,7 +67,7 @@ cr.define('options', function() { |
if (BrowserOptions.getCurrentProfile().isManaged) |
return; |
chrome.send('deleteProfile', [self.profileInfo_.filePath]); |
- options.ManagedUserListData.reloadExistingManagedUsers(); |
+ options.ManagedUserListData.resetPromise(); |
}; |
$('add-shortcut-button').onclick = function(event) { |
chrome.send('addProfileShortcut', [self.profileInfo_.filePath]); |
@@ -316,7 +316,7 @@ cr.define('options', function() { |
this.updateOkButton_('create'); |
return; |
} |
- options.ManagedUserListData.requestExistingManagedUsers( |
+ options.ManagedUserListData.requestExistingManagedUsers().then( |
this.receiveExistingManagedUsers_.bind(this), |
this.onSigninError_.bind(this)); |
}, |
@@ -403,6 +403,8 @@ cr.define('options', function() { |
chrome.send('setProfileIconAndName', |
[this.profileInfo_.filePath, iconURL, name]); |
+ if (name != this.profileInfo_.name) |
+ options.ManagedUserListData.resetPromise(); |
}, |
/** |
@@ -670,7 +672,7 @@ cr.define('options', function() { |
this.updateCreateInProgress_(false); |
OptionsPage.closeOverlay(); |
if (profileInfo.isManaged) { |
- options.ManagedUserListData.reloadExistingManagedUsers(); |
+ options.ManagedUserListData.resetPromise(); |
profileInfo.custodianEmail = this.signedInEmail_; |
ManagedUserCreateConfirmOverlay.setProfileInfo(profileInfo); |
OptionsPage.showPageByName('managedUserCreateConfirm', false); |