| 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
|
|
|