Index: chrome/browser/resources/user_manager/user_manager.js |
diff --git a/chrome/browser/resources/user_manager/user_manager.js b/chrome/browser/resources/user_manager/user_manager.js |
index 84fab310838f06db9530d2f80d89a7b65d3e1eb0..c748b2fe0472b2889b7fc2a6b169c8b2234551a1 100644 |
--- a/chrome/browser/resources/user_manager/user_manager.js |
+++ b/chrome/browser/resources/user_manager/user_manager.js |
@@ -32,17 +32,19 @@ cr.define('cr.ui', function() { |
/** |
* Shows the given screen. |
- * @param {Object} screen Screen params dict, e.g. {id: screenId, data: data} |
+ * @param {bool} showGuest Whether the 'Browse as Guest' button is displayed. |
+ * @param {bool} showAddPerson Whether the 'Add Person' button is displayed. |
*/ |
- Oobe.showUserManagerScreen = function(showGuest) { |
+ Oobe.showUserManagerScreen = function(showGuest, showAddPerson) { |
Oobe.getInstance().showScreen({id: 'account-picker', |
data: {disableAddUser: false}}); |
// The ChromeOS account-picker will hide the AddUser button if a user is |
// logged in and the screen is "locked", so we must re-enabled it |
$('add-user-header-bar-item').hidden = false; |
- // Hide the Guest Mode option if the user is not permitted to select it. |
+ // Hide control options if the user does not have the right permissions. |
$('guest-user-button').hidden = !showGuest; |
+ $('add-user-button').hidden = !showAddPerson; |
$('login-header-bar').hidden = false; |
// Disable the context menu, as the Print/Inspect element items don't |