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

Unified Diff: chrome/browser/resources/md_user_manager/user_manager.js

Issue 2025433002: MD User Manager: Display error message when all profiles are locked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/md_user_manager/user_manager.js
diff --git a/chrome/browser/resources/md_user_manager/user_manager.js b/chrome/browser/resources/md_user_manager/user_manager.js
index 6864f2c15aee827e7fb3d549e0cf1d4bd0b9f64e..ed6e7fd2dfc6fc742ef9231df71ab37d78d9b8fb 100644
--- a/chrome/browser/resources/md_user_manager/user_manager.js
+++ b/chrome/browser/resources/md_user_manager/user_manager.js
@@ -40,6 +40,12 @@ cr.define('cr.ui', function() {
newDesktopUserManager: true,
/**
+ * True if all (non-supervised and non-child) profiles are locked.
+ * @type {boolean}
+ */
+ areAllProfilesLocked: false,
+
+ /**
* @override
* Overrides clientAreaSize in DisplayManager. When a new profile is created
* the #outer-container page may not be visible yet, so user-pods cannot be
@@ -74,8 +80,13 @@ cr.define('cr.ui', function() {
* displayed.
* @param {boolean} showAddPerson True if 'Add Person' button should be
* displayed.
+ * @param {boolean} areAllProfilesLocked True if all profiles are locked.
*/
- UserManager.showUserManagerScreen = function(showGuest, showAddPerson) {
+ UserManager.showUserManagerScreen = function(showGuest,
+ showAddPerson,
+ areAllProfilesLocked) {
+ UserManager.getInstance().areAllProfilesLocked = areAllProfilesLocked;
+
UserManager.getInstance().showScreen({id: 'account-picker',
data: {disableAddUser: false}});
// Hide control options if the user does not have the right permissions.
@@ -132,6 +143,14 @@ cr.define('cr.ui', function() {
DisplayManager.clearErrors();
};
+ /**
+ * Shows the error dialog populated with the given message.
+ * @param {string} message Error message to show.
+ */
+ UserManager.showErrorDialog = function(message) {
+ document.querySelector('error-dialog').show(message);
+ };
+
// Export
return {
UserManager: UserManager

Powered by Google App Engine
This is Rietveld 408576698