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

Side by Side Diff: chrome/browser/resources/settings/privacy_page/privacy_page.js

Issue 2861443003: MD Settings: Fix subpage visibility and add appearance page tests (Closed)
Patch Set: Created 3 years, 7 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 * 'settings-privacy-page' is the settings page containing privacy and 7 * 'settings-privacy-page' is the settings page containing privacy and
8 * security settings. 8 * security settings.
9 */ 9 */
10 (function() { 10 (function() {
(...skipping 24 matching lines...) Expand all
35 */ 35 */
36 prefs: { 36 prefs: {
37 type: Object, 37 type: Object,
38 notify: true, 38 notify: true,
39 }, 39 },
40 40
41 /** 41 /**
42 * Dictionary defining page visibility. 42 * Dictionary defining page visibility.
43 * @type {!PrivacyPageVisibility} 43 * @type {!PrivacyPageVisibility}
44 */ 44 */
45 pageVisibility: Object, 45 pageVisibility: {
46 type: Object,
47 value: function() {
48 return {};
49 },
50 },
46 51
47 /** @private */ 52 /** @private */
48 isGuest_: { 53 isGuest_: {
49 type: Boolean, 54 type: Boolean,
50 value: function() { 55 value: function() {
51 return loadTimeData.getBoolean('isGuest'); 56 return loadTimeData.getBoolean('isGuest');
52 } 57 }
53 }, 58 },
54 59
55 // <if expr="_google_chrome and not chromeos"> 60 // <if expr="_google_chrome and not chromeos">
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 this.browserProxy_.getSafeBrowsingExtendedReporting().then(setSber); 148 this.browserProxy_.getSafeBrowsingExtendedReporting().then(setSber);
144 }, 149 },
145 150
146 /** @protected */ 151 /** @protected */
147 currentRouteChanged: function() { 152 currentRouteChanged: function() {
148 this.showClearBrowsingDataDialog_ = 153 this.showClearBrowsingDataDialog_ =
149 settings.getCurrentRoute() == settings.Route.CLEAR_BROWSER_DATA; 154 settings.getCurrentRoute() == settings.Route.CLEAR_BROWSER_DATA;
150 }, 155 },
151 156
152 /** 157 /**
158 * @param {boolean|undefined} visibility
159 * @return {boolean}
160 * @private
161 */
162 showPage_: function(visibility) {
163 return visibility !== false;
164 },
165
166 /**
153 * @param {Event} event 167 * @param {Event} event
154 * @private 168 * @private
155 */ 169 */
156 onDoNotTrackDomChange_: function(event) { 170 onDoNotTrackDomChange_: function(event) {
157 if (this.showDoNotTrackDialog_) 171 if (this.showDoNotTrackDialog_)
158 this.maybeShowDoNotTrackDialog_(); 172 this.maybeShowDoNotTrackDialog_();
159 }, 173 },
160 174
161 /** 175 /**
162 * Handles the change event for the do-not-track toggle. Shows a 176 * Handles the change event for the do-not-track toggle. Shows a
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 : this.i18n('siteSettingsBlocked'); 342 : this.i18n('siteSettingsBlocked');
329 }, 343 },
330 344
331 /** @private */ 345 /** @private */
332 getProtectedContentIdentifiersLabel_: function(value) { 346 getProtectedContentIdentifiersLabel_: function(value) {
333 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers') 347 return value ? this.i18n('siteSettingsProtectedContentEnableIdentifiers')
334 : this.i18n('siteSettingsBlocked'); 348 : this.i18n('siteSettingsBlocked');
335 }, 349 },
336 }); 350 });
337 })(); 351 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698