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

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

Issue 222143002: Mark supervised users in the "Users" list in about:settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: #999 instead of gray. Created 6 years, 9 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/browser_options_profile_list.js
diff --git a/chrome/browser/resources/options/browser_options_profile_list.js b/chrome/browser/resources/options/browser_options_profile_list.js
index a51b5b7bfd0ee7d79e20d5b37e46d48a807e32e3..429780ede632a32dc16a9296bc2d735e7b39a452 100644
--- a/chrome/browser/resources/options/browser_options_profile_list.js
+++ b/chrome/browser/resources/options/browser_options_profile_list.js
@@ -9,7 +9,7 @@ cr.define('options.browser_options', function() {
/**
* Creates a new profile list item.
- * @param {Object} profileInfo The profile this item respresents.
+ * @param {Object} profileInfo The profile this item represents.
* @constructor
* @extends {cr.ui.DeletableItem}
*/
@@ -52,16 +52,19 @@ cr.define('options.browser_options', function() {
var profileInfo = this.profileInfo_;
+ var containerEl = this.ownerDocument.createElement('div');
+ containerEl.className = 'profile-container';
+
var iconEl = this.ownerDocument.createElement('img');
iconEl.className = 'profile-img';
iconEl.style.content = getProfileAvatarIcon(profileInfo.iconURL);
- this.contentElement.appendChild(iconEl);
+ containerEl.appendChild(iconEl);
var nameEl = this.ownerDocument.createElement('div');
nameEl.className = 'profile-name';
if (profileInfo.isCurrentProfile)
nameEl.classList.add('profile-item-current');
- this.contentElement.appendChild(nameEl);
+ containerEl.appendChild(nameEl);
var displayName = profileInfo.name;
if (profileInfo.isCurrentProfile) {
@@ -70,6 +73,16 @@ cr.define('options.browser_options', function() {
}
nameEl.textContent = displayName;
+ if (profileInfo.isManaged) {
+ var supervisedEl = this.ownerDocument.createElement('div');
+ supervisedEl.className = 'profile-supervised';
+ supervisedEl.textContent =
+ '(' + loadTimeData.getStringF('managedUserLabel') + ')';
+ containerEl.appendChild(supervisedEl);
+ }
+
+ this.contentElement.appendChild(containerEl);
+
// Ensure that the button cannot be tabbed to for accessibility reasons.
this.closeButtonElement.tabIndex = -1;
},
@@ -116,7 +129,7 @@ cr.define('options.browser_options', function() {
},
/**
- * If false, items in this list will not be deltable.
+ * If false, items in this list will not be deletable.
* @private
*/
canDeleteItems_: true,
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('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