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

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: rebase after overscrollHeight_() fix 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 4a48a510172c20620b3369b96f8ed8e142fcaa34..521612768f0204b6d71ca9876251eeef0d6224ae 100644
--- a/chrome/browser/resources/settings/settings_ui/settings_ui.js
+++ b/chrome/browser/resources/settings/settings_ui/settings_ui.js
@@ -60,13 +60,23 @@ Polymer({
type: Boolean,
value: false,
},
+
+ /**
+ * Dictionary defining page visibility.
+ * @private {!GuestModePageVisibility}
+ */
+ pageVisibility_: Object,
},
listeners: {
'sideNav.iron-activate': 'onIronActivate_',
},
- /** @override */
+ /**
+ * @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);
@@ -75,6 +85,40 @@ Polymer({
window.addEventListener('popstate', function(e) {
this.$$('app-drawer').close();
}.bind(this));
+
+ if (loadTimeData.getBoolean('isGuest')) {
+ 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 */

Powered by Google App Engine
This is Rietveld 408576698