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

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

Issue 2962823002: MD Settings: decouple page visibility from settings_ui.html. (Closed)
Patch Set: Created 3 years, 6 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/page_visibility.js
diff --git a/chrome/browser/resources/settings/page_visibility.js b/chrome/browser/resources/settings/page_visibility.js
new file mode 100644
index 0000000000000000000000000000000000000000..1da99e31d71877a0d629942bd4602d2ac4f07592
--- /dev/null
+++ b/chrome/browser/resources/settings/page_visibility.js
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+cr.define('settings', function() {
dpapad 2017/06/28 01:16:11 Can you add a compile target for this file?
scottchen 2017/06/28 20:51:49 Done.
+
+ var PageVisibility = {};
+
+ if (loadTimeData.getBoolean('isGuest')) {
+ PageVisibility = Object.assign(PageVisibility, {
dpapad 2017/06/28 01:16:11 Is the call to Object.assign necessary here? Isn't
scottchen 2017/06/28 20:51:49 Acknowledged.
+ passwordsAndForms: false,
+ 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,
+ privacy: {
+ searchPrediction: false,
+ networkPrediction: false,
+ },
+ downloads: {
+ googleDrive: false,
+ },
+ // </if>
+ });
+ }
+
+ return {PageVisibility: PageVisibility};
dpapad 2017/06/28 01:16:11 Nit: Usually upper case is used to name a class, n
scottchen 2017/06/28 20:51:49 Done.
+});

Powered by Google App Engine
This is Rietveld 408576698