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

Unified Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 2062503002: Settings People Revamp: Add 'Manage Supervised Users' row (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/settings/people_page/people_page.js
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js
index 7330a8ccb982cd4f7aabc5ba82788b65abbdef8d..bbbc348108bbee7ab7c1819b47d0b3a3eb20a3d8 100644
--- a/chrome/browser/resources/settings/people_page/people_page.js
+++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -46,6 +46,11 @@ Polymer({
*/
profileName_: String,
+ /**
+ * True if the current profile manages supervised users.
+ */
+ profileManagesSupervisedUsers_: Boolean,
+
/** @private {!settings.SyncBrowserProxyImpl} */
syncBrowserProxy_: {
type: Object,
@@ -112,11 +117,16 @@ Polymer({
/** @override */
attached: function() {
- settings.ProfileInfoBrowserProxyImpl.getInstance().getProfileInfo().then(
- this.handleProfileInfo_.bind(this));
+ var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance();
+ profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this));
this.addWebUIListener('profile-info-changed',
this.handleProfileInfo_.bind(this));
+ profileInfoProxy.getProfileManagesSupervisedUsers().then(
+ this.handleProfileManagesSupervisedUsers_.bind(this));
+ this.addWebUIListener('profile-manages-supervised-users-changed',
+ this.handleProfileManagesSupervisedUsers_.bind(this));
+
this.syncBrowserProxy_.getSyncStatus().then(
this.handleSyncStatus_.bind(this));
this.addWebUIListener('sync-status-changed',
@@ -144,6 +154,15 @@ Polymer({
},
/**
+ * Handler for when the profile starts or stops managing supervised users.
+ * @private
+ * @param {boolean} managesSupervisedUsers
+ */
+ handleProfileManagesSupervisedUsers_: function(managesSupervisedUsers) {
+ this.profileManagesSupervisedUsers_ = managesSupervisedUsers;
+ },
+
+ /**
* Handler for when the sync state is pushed from the browser.
* @param {?settings.SyncStatus} syncStatus
* @private
@@ -235,6 +254,11 @@ Polymer({
</if>
},
+ /** @private */
+ onManageSupervisedUsers_: function() {
+ window.open(loadTimeData.getString('supervisedUsersUrl'));
+ },
+
/**
* @private
* @param {?settings.SyncStatus} syncStatus

Powered by Google App Engine
This is Rietveld 408576698