| 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 5698401c9806adf1293cdc77451f288973c87f53..2aaf3a1a9fb4238de60b31df7bef3a0f400b3aa9 100644
|
| --- a/chrome/browser/resources/settings/people_page/people_page.js
|
| +++ b/chrome/browser/resources/settings/people_page/people_page.js
|
| @@ -10,12 +10,10 @@ Polymer({
|
| is: 'settings-people-page',
|
|
|
| behaviors: [
|
| - settings.RouteObserverBehavior,
|
| - I18nBehavior,
|
| - WebUIListenerBehavior,
|
| -<if expr="chromeos">
|
| + settings.RouteObserverBehavior, I18nBehavior, WebUIListenerBehavior,
|
| + /* <if expr="chromeos"> */
|
| LockStateBehavior,
|
| -</if>
|
| + /* </if> */
|
| ],
|
|
|
| properties: {
|
| @@ -65,13 +63,13 @@ Polymer({
|
| */
|
| deleteProfile_: Boolean,
|
|
|
| -<if expr="not chromeos">
|
| + /* <if expr="not chromeos"> */
|
| /** @private */
|
| showImportDataDialog_: {
|
| type: Boolean,
|
| value: false,
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /** @private {!settings.SyncBrowserProxy} */
|
| syncBrowserProxy_: {
|
| @@ -81,7 +79,7 @@ Polymer({
|
| },
|
| },
|
|
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| /**
|
| * True if quick unlock settings should be displayed on this machine.
|
| * @private
|
| @@ -140,30 +138,31 @@ Polymer({
|
| type: Boolean,
|
| value: false,
|
| },
|
| -</if>
|
| + /* </if> */
|
| },
|
|
|
| /** @override */
|
| attached: function() {
|
| var profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance();
|
| profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this));
|
| - this.addWebUIListener('profile-info-changed',
|
| - 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.addWebUIListener(
|
| + 'profile-manages-supervised-users-changed',
|
| + this.handleProfileManagesSupervisedUsers_.bind(this));
|
|
|
| - this.addWebUIListener('profile-stats-count-ready',
|
| - this.handleProfileStatsCount_.bind(this));
|
| + this.addWebUIListener(
|
| + 'profile-stats-count-ready', this.handleProfileStatsCount_.bind(this));
|
|
|
| this.syncBrowserProxy_.getSyncStatus().then(
|
| this.handleSyncStatus_.bind(this));
|
| - this.addWebUIListener('sync-status-changed',
|
| - this.handleSyncStatus_.bind(this));
|
| + this.addWebUIListener(
|
| + 'sync-status-changed', this.handleSyncStatus_.bind(this));
|
|
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| if (this.easyUnlockAllowed_) {
|
| this.addWebUIListener(
|
| 'easy-unlock-enabled-status',
|
| @@ -171,7 +170,7 @@ Polymer({
|
| this.easyUnlockBrowserProxy_.getEnabledStatus().then(
|
| this.handleEasyUnlockEnabledStatusChanged_.bind(this));
|
| }
|
| -</if>
|
| + /* </if> */
|
| },
|
|
|
| /** @protected */
|
| @@ -195,7 +194,7 @@ Polymer({
|
| }
|
| },
|
|
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| /** @private */
|
| getPasswordState_: function(hasPin, enableScreenLock) {
|
| if (!enableScreenLock)
|
| @@ -204,7 +203,7 @@ Polymer({
|
| return this.i18n('lockScreenPinOrPassword');
|
| return this.i18n('lockScreenPasswordOnly');
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /**
|
| * Handler for when the profile's icon and name is updated.
|
| @@ -233,12 +232,15 @@ Polymer({
|
| handleProfileStatsCount_: function(count) {
|
| this.deleteProfileWarning_ = (count > 0) ?
|
| (count == 1) ?
|
| - loadTimeData.getStringF('deleteProfileWarningWithCountsSingular',
|
| - this.syncStatus.signedInUsername) :
|
| - loadTimeData.getStringF('deleteProfileWarningWithCountsPlural',
|
| - count, this.syncStatus.signedInUsername) :
|
| - loadTimeData.getStringF('deleteProfileWarningWithoutCounts',
|
| - this.syncStatus.signedInUsername);
|
| + loadTimeData.getStringF(
|
| + 'deleteProfileWarningWithCountsSingular',
|
| + this.syncStatus.signedInUsername) :
|
| + loadTimeData.getStringF(
|
| + 'deleteProfileWarningWithCountsPlural', count,
|
| + this.syncStatus.signedInUsername) :
|
| + loadTimeData.getStringF(
|
| + 'deleteProfileWarningWithoutCounts',
|
| + this.syncStatus.signedInUsername);
|
| },
|
|
|
| /**
|
| @@ -256,7 +258,7 @@ Polymer({
|
| this.syncStatus = syncStatus;
|
| },
|
|
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| /**
|
| * Handler for when the Easy Unlock enabled status has changed.
|
| * @private
|
| @@ -266,24 +268,24 @@ Polymer({
|
| this.showEasyUnlockTurnOffDialog_ =
|
| easyUnlockEnabled && this.showEasyUnlockTurnOffDialog_;
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /** @private */
|
| onPictureTap_: function() {
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| settings.navigateTo(settings.Route.CHANGE_PICTURE);
|
| -</if>
|
| -<if expr="not chromeos">
|
| + /* </if> */
|
| + /* <if expr="not chromeos"> */
|
| settings.navigateTo(settings.Route.MANAGE_PROFILE);
|
| -</if>
|
| + /* </if> */
|
| },
|
|
|
| -<if expr="not chromeos">
|
| + /* <if expr="not chromeos"> */
|
| /** @private */
|
| onProfileNameTap_: function() {
|
| settings.navigateTo(settings.Route.MANAGE_PROFILE);
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /** @private */
|
| onActivityControlsTap_: function() {
|
| @@ -341,10 +343,10 @@ Polymer({
|
| this.syncBrowserProxy_.startSignIn();
|
| break;
|
| case settings.StatusAction.SIGNOUT_AND_SIGNIN:
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| this.syncBrowserProxy_.attemptUserExit();
|
| -</if>
|
| -<if expr="not chromeos">
|
| + /* </if> */
|
| + /* <if expr="not chromeos"> */
|
| if (this.syncStatus.domain)
|
| settings.navigateTo(settings.Route.SIGN_OUT);
|
| else {
|
| @@ -353,7 +355,7 @@ Polymer({
|
| this.syncBrowserProxy_.signOut(false);
|
| this.syncBrowserProxy_.startSignIn();
|
| }
|
| -</if>
|
| + /* </if> */
|
| break;
|
| case settings.StatusAction.UPGRADE_CLIENT:
|
| settings.navigateTo(settings.Route.ABOUT);
|
| @@ -365,7 +367,7 @@ Polymer({
|
| }
|
| },
|
|
|
| -<if expr="chromeos">
|
| + /* <if expr="chromeos"> */
|
| /** @private */
|
| onConfigureLockTap_: function() {
|
| settings.navigateTo(settings.Route.LOCK_SCREEN);
|
| @@ -389,16 +391,16 @@ Polymer({
|
| onEasyUnlockTurnOffDialogClose_: function() {
|
| this.showEasyUnlockTurnOffDialog_ = false;
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /** @private */
|
| onManageOtherPeople_: function() {
|
| -<if expr="not chromeos">
|
| + /* <if expr="not chromeos"> */
|
| this.syncBrowserProxy_.manageOtherPeople();
|
| -</if>
|
| -<if expr="chromeos">
|
| + /* </if> */
|
| + /* <if expr="chromeos"> */
|
| settings.navigateTo(settings.Route.ACCOUNTS);
|
| -</if>
|
| + /* </if> */
|
| },
|
|
|
| /** @private */
|
| @@ -406,15 +408,14 @@ Polymer({
|
| window.open(loadTimeData.getString('supervisedUsersUrl'));
|
| },
|
|
|
| -<if expr="not chromeos">
|
| + /* <if expr="not chromeos"> */
|
| /**
|
| * @private
|
| * @param {string} domain
|
| * @return {string}
|
| */
|
| getDomainHtml_: function(domain) {
|
| - var innerSpan =
|
| - '<span id="managed-by-domain-name">' + domain + '</span>';
|
| + var innerSpan = '<span id="managed-by-domain-name">' + domain + '</span>';
|
| return loadTimeData.getStringF('domainManagedProfile', innerSpan);
|
| },
|
|
|
| @@ -427,7 +428,7 @@ Polymer({
|
| onImportDataDialogClosed_: function() {
|
| settings.navigateToPreviousRoute();
|
| },
|
| -</if>
|
| + /* </if> */
|
|
|
| /**
|
| * @private
|
| @@ -435,13 +436,13 @@ Polymer({
|
| * @return {string}
|
| */
|
| getDisconnectExplanationHtml_: function(domain) {
|
| -<if expr="not chromeos">
|
| + /* <if expr="not chromeos"> */
|
| if (domain) {
|
| return loadTimeData.getStringF(
|
| 'syncDisconnectManagedProfileExplanation',
|
| '<span id="managed-by-domain-name">' + domain + '</span>');
|
| }
|
| -</if>
|
| + /* </if> */
|
| return loadTimeData.getString('syncDisconnectExplanation');
|
| },
|
|
|
| @@ -463,8 +464,9 @@ Polymer({
|
| * error, there is an action associated with it.
|
| */
|
| isSyncStatusActionable_: function(syncStatus) {
|
| - return !!syncStatus && !syncStatus.managed && (!syncStatus.hasError ||
|
| - syncStatus.statusAction != settings.StatusAction.NO_ACTION);
|
| + return !!syncStatus && !syncStatus.managed &&
|
| + (!syncStatus.hasError ||
|
| + syncStatus.statusAction != settings.StatusAction.NO_ACTION);
|
| },
|
|
|
| /**
|
|
|