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

Side by Side Diff: chrome/browser/resources/settings/site_settings/site_settings_behavior.js

Issue 1477773003: Use dom-if to hide settings pages and show explicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 5 years 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 Behavior common to Site Settings classes. 6 * @fileoverview Behavior common to Site Settings classes.
7 */ 7 */
8 8
9 /** @polymerBehavior */ 9 /** @polymerBehavior */
10 var SiteSettingsBehaviorImpl = { 10 var SiteSettingsBehaviorImpl = {
11 properties: {
12 /**
13 * The ID of the category this element is displaying data for.
14 */
15 category: {
16 type: Number,
17 value: settings.ContentSettingsTypes.GEOLOCATION
michaelpg 2015/12/02 19:22:52 No reason to make geolocation the default category
stevenjb 2015/12/02 21:57:10 Done.
18 },
19 },
20
11 /** 21 /**
12 * Returns whether the category default is set to enabled or not. 22 * Returns whether the category default is set to enabled or not.
13 * @param {number} category The category to check. 23 * @param {number} category The category to check.
14 * @return {boolean} True if the category default is set to enabled. 24 * @return {boolean} True if the category default is set to enabled.
15 * @protected 25 * @protected
16 */ 26 */
17 isCategoryAllowed: function(category) { 27 isCategoryAllowed: function(category) {
18 var pref = this.getPref(this.computeCategoryPrefName(category)); 28 var pref = this.getPref(this.computeCategoryPrefName(category));
19 29
20 // FullScreen is Allow vs. Ask. 30 // FullScreen is Allow vs. Ask.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 loadTimeData.getString('siteSettingsBlocked'); 191 loadTimeData.getString('siteSettingsBlocked');
182 default: 192 default:
183 assertNotReached(); 193 assertNotReached();
184 return ''; 194 return '';
185 } 195 }
186 }, 196 },
187 }; 197 };
188 198
189 /** @polymerBehavior */ 199 /** @polymerBehavior */
190 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl]; 200 var SiteSettingsBehavior = [PrefsBehavior, SiteSettingsBehaviorImpl];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698