Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Unified Diff: chrome/browser/resources/options/manage_profile_overlay.js

Issue 132013002: Replace own callback handling with Promises. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698