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

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

Issue 2106103006: MD Settings: cr/cros - Guest mode page visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 5 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/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() ?

Powered by Google App Engine
This is Rietveld 408576698