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

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

Issue 518063002: Settings to control Add Person and Browse as Guest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Completely move prefs Created 6 years, 3 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/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
« no previous file with comments | « chrome/browser/resources/options/options.html ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698