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

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: 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..88fbd22c21505df4d8ef6484b6e170a31889a2c7 100644
--- a/chrome/browser/resources/options/managed_user_import.js
+++ b/chrome/browser/resources/options/managed_user_import.js
@@ -167,12 +167,17 @@ cr.define('options', function() {
* name: "Managed User Name",
* iconURL: "chrome://path/to/icon/image",
* onCurrentDevice: true or false,
+ * nameConflict: true or false,
* needAvatar: true or false
* }
* @private
*/
receiveExistingManagedUsers_: function(managedUsers) {
managedUsers.sort(function(a, b) {
+ if (a.onCurrentDevice != b.onCurrentDevice)
+ return a.onCurrentDevice ? 1 : -1;
+ if (a.nameConflict != b.nameConflict)
+ return a.nameConflict ? 1 : -1;
return a.name.localeCompare(b.name);
});

Powered by Google App Engine
This is Rietveld 408576698