Chromium Code Reviews| Index: chrome/browser/resources/settings/people_page/manage_profile.js |
| diff --git a/chrome/browser/resources/settings/people_page/manage_profile.js b/chrome/browser/resources/settings/people_page/manage_profile.js |
| index 898085276ba0b88190ddbb50e665094d7656afba..03db81b81aecaa1d94d51a6ffdb87a9b10f5d461 100644 |
| --- a/chrome/browser/resources/settings/people_page/manage_profile.js |
| +++ b/chrome/browser/resources/settings/people_page/manage_profile.js |
| @@ -55,15 +55,9 @@ Polymer({ |
| /** |
| * True if the profile shortcuts feature is enabled. |
| - * @private |
| + * @private {boolean} |
| */ |
| - isProfileShortcutsEnabled_: { |
| - type: Boolean, |
| - value: function() { |
| - return loadTimeData.getBoolean('profileShortcutsEnabled'); |
| - }, |
| - readOnly: true, |
| - }, |
| + isProfileShortcutSettingVisible_: false, |
|
Dan Beam
2016/11/23 00:29:16
this should either be
isProfileShortcutSettingVis
tommycli
2016/11/23 19:00:46
Done.
|
| }, |
| /** @override */ |
| @@ -81,11 +75,17 @@ Polymer({ |
| if (settings.getCurrentRoute() == settings.Route.MANAGE_PROFILE) { |
| this.$.name.value = this.profileName; |
| - if (this.isProfileShortcutsEnabled_) { |
| - var setHasProfileShortcut = function(hasProfileShortcut) { |
| - this.hasProfileShortcut_ = hasProfileShortcut; |
| - }.bind(this); |
| - this.browserProxy_.getHasProfileShortcut().then(setHasProfileShortcut); |
| + if (loadTimeData.getBoolean('profileShortcutsEnabled')) { |
| + this.browserProxy_.getProfileShortcutStatus().then(function(status) { |
| + if (status == ProfileShortcutStatus.PROFILE_SHORTCUT_SETTING_HIDDEN) { |
| + this.isProfileShortcutSettingVisible_ = false; |
| + return; |
| + } |
| + |
| + this.isProfileShortcutSettingVisible_ = true; |
| + this.hasProfileShortcut_ = |
| + status == ProfileShortcutStatus.PROFILE_SHORTCUT_FOUND; |
| + }.bind(this)); |
| } |
| } |
| }, |