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

Side by Side Diff: chrome/browser/resources/settings/settings_page/settings_page_visibility.js

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * Behavior controlling the visibility of Settings pages. 7 * Behavior controlling the visibility of Settings pages.
8 * 8 *
9 * Example: 9 * Example:
10 * behaviors: [SettingsPageVisibility], 10 * behaviors: [SettingsPageVisibility],
(...skipping 13 matching lines...) Expand all
24 var SettingsPageVisibility = { 24 var SettingsPageVisibility = {
25 properties: { 25 properties: {
26 /** 26 /**
27 * Dictionary defining page visibility. If not set for a page, visibility 27 * Dictionary defining page visibility. If not set for a page, visibility
28 * will default to true, unless settingsHidePagesByDefaultForTest is set 28 * will default to true, unless settingsHidePagesByDefaultForTest is set
29 * in which case visibility defaults to false. 29 * in which case visibility defaults to false.
30 * @type {Object<boolean>} 30 * @type {Object<boolean>}
31 */ 31 */
32 pageVisibility: { 32 pageVisibility: {
33 type: Object, 33 type: Object,
34 value: function() { return {}; }, 34 value: function() {
35 return {};
36 },
35 }, 37 },
36 }, 38 },
37 39
38 /** 40 /**
39 * @param {boolean|undefined} visibility 41 * @param {boolean|undefined} visibility
40 * @return {boolean} 42 * @return {boolean}
41 */ 43 */
42 showPage: function(visibility) { 44 showPage: function(visibility) {
43 if (settingsHidePagesByDefaultForTest) 45 if (settingsHidePagesByDefaultForTest)
44 return visibility === true; 46 return visibility === true;
45 return visibility !== false; 47 return visibility !== false;
46 }, 48 },
47 }; 49 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698