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

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

Issue 132013002: Replace own callback handling with Promises. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits. 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/managed_user_import.js
diff --git a/chrome/browser/resources/options/managed_user_import.js b/chrome/browser/resources/options/managed_user_import.js
index 0152169cb6be4bc018ee41e72983e626d595bbf6..5430a46b5a79a80417b9c15810b3a0dad6b3d3d8 100644
--- a/chrome/browser/resources/options/managed_user_import.js
+++ b/chrome/browser/resources/options/managed_user_import.js
@@ -75,7 +75,7 @@ cr.define('options', function() {
* @override
*/
didShowPage: function() {
- options.ManagedUserListData.requestExistingManagedUsers(
+ options.ManagedUserListData.requestExistingManagedUsers().then(
this.receiveExistingManagedUsers_, this.onSigninError_.bind(this));
this.updateImportInProgress_(false);
@@ -173,6 +173,8 @@ cr.define('options', function() {
*/
receiveExistingManagedUsers_: function(managedUsers) {
managedUsers.sort(function(a, b) {
+ if (a.onCurrentDevice != b.onCurrentDevice)
+ return a.onCurrentDevice ? 1 : -1;
return a.name.localeCompare(b.name);
});
« no previous file with comments | « chrome/browser/resources/options/manage_profile_overlay.js ('k') | chrome/browser/resources/options/managed_user_list_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698