Chromium Code Reviews| Index: chrome/browser/resources/settings/settings_ui/settings_ui.js |
| diff --git a/chrome/browser/resources/settings/settings_ui/settings_ui.js b/chrome/browser/resources/settings/settings_ui/settings_ui.js |
| index 09ad8f6de7c0162c0b2834fdb4ae1fb8e53a2e7c..fde8cce342e2db38a32f71cb406fb6de2cf649fe 100644 |
| --- a/chrome/browser/resources/settings/settings_ui/settings_ui.js |
| +++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js |
| @@ -60,12 +60,65 @@ Polymer({ |
| type: Boolean, |
| value: false, |
| }, |
| + |
| + /** |
| + * Dictionary defining page visibility. |
| + * @private {!GuestModePageVisibility} |
| + */ |
| + pageVisibility_: { |
| + type: Object, |
| + }, |
| }, |
| listeners: { |
| 'sideNav.iron-activate': 'onIronActivate_', |
| }, |
| + /** |
| + * @override |
| + * @suppress {es5Strict} Object literals cannot contain duplicate keys in ES5 |
| + * strict mode. |
| + */ |
| + ready: function() { |
| + this.$$('cr-toolbar').addEventListener('search-changed', function(e) { |
| + this.$$('settings-main').searchContents(e.detail); |
| + }.bind(this)); |
| + |
| + if (loadTimeData.getBoolean('isGuest')) { |
|
dpapad
2016/07/22 22:40:48
Can you not move this logic at line 69 as follows?
Moe
2016/07/24 23:54:27
Unfortunately not. @suppress won't work for declar
|
| + this.pageVisibility_ = { |
| + people: false, |
| + onStartup: false, |
| + reset: false, |
| +<if expr="not chromeos"> |
| + appearance: false, |
| + defaultBrowser: false, |
| + advancedSettings: false, |
| +</if> |
| +<if expr="chromeos"> |
| + appearance: { |
| + setWallpaper: false, |
| + setTheme: false, |
| + homeButton: false, |
| + bookmarksBar: false, |
| + pageZoom: false, |
| + }, |
| + advancedSettings: true, |
| + dateTime: { |
| + timeZoneSelector: false, |
| + }, |
| + privacy: { |
| + searchPrediction: false, |
| + networkPrediction: false, |
| + }, |
| + passwordsAndForms: false, |
| + downloads: { |
| + googleDrive: false, |
| + }, |
| +</if> |
| + }; |
| + } |
| + }, |
| + |
| /** @private */ |
| onCloseAppealTap_: function() { |
| window.sessionStorage.appealClosed_ = this.appealClosed_ = true; |
| @@ -85,13 +138,6 @@ Polymer({ |
| this.$$('app-drawer').toggle(); |
| }, |
| - /** @override */ |
| - ready: function() { |
| - this.$$('cr-toolbar').addEventListener('search-changed', function(e) { |
| - this.$$('settings-main').searchContents(e.detail); |
| - }.bind(this)); |
| - }, |
| - |
| /** @private */ |
| directionDelegateChanged_: function() { |
| this.$$('app-drawer').align = this.directionDelegate.isRtl() ? |