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

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

Issue 2357983005: Site Settings Desktop: Support SessionOnly for cookies on Site Details page. (Closed)
Patch Set: Created 4 years, 2 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 * 'site-details-permission' handles showing the state of one permission, such 7 * 'site-details-permission' handles showing the state of one permission, such
8 * as Geolocation, for a given origin. 8 * as Geolocation, for a given origin.
9 */ 9 */
10 Polymer({ 10 Polymer({
(...skipping 23 matching lines...) Expand all
34 * @param {string} left The first origin to compare. 34 * @param {string} left The first origin to compare.
35 * @param {string} right The second origin to compare. 35 * @param {string} right The second origin to compare.
36 * @return {boolean} True if the origins are the same. 36 * @return {boolean} True if the origins are the same.
37 * @private 37 * @private
38 */ 38 */
39 sameOrigin_: function(left, right) { 39 sameOrigin_: function(left, right) {
40 return this.removePatternWildcard(left) == 40 return this.removePatternWildcard(left) ==
41 this.removePatternWildcard(right); 41 this.removePatternWildcard(right);
42 }, 42 },
43 43
44 /** @private */
45 isCookiesCategory_: function(category) {
46 return category == settings.ContentSettingsTypes.COOKIES;
47 },
48
44 /** 49 /**
45 * Sets the site to display. 50 * Sets the site to display.
46 * @param {!SiteException} site The site to display. 51 * @param {!SiteException} site The site to display.
47 * @private 52 * @private
48 */ 53 */
49 siteChanged_: function(site) { 54 siteChanged_: function(site) {
50 this.$.details.hidden = true; 55 this.$.details.hidden = true;
51 56
52 this.browserProxy.getExceptionList(this.category).then( 57 this.browserProxy.getExceptionList(this.category).then(
53 function(exceptionList) { 58 function(exceptionList) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 * Handles the category permission changing for this origin. 101 * Handles the category permission changing for this origin.
97 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event 102 * @param {!{detail: !{item: !{dataset: !{permissionValue: string}}}}} event
98 */ 103 */
99 onPermissionMenuIronActivate_: function(event) { 104 onPermissionMenuIronActivate_: function(event) {
100 var value = event.detail.item.dataset.permissionValue; 105 var value = event.detail.item.dataset.permissionValue;
101 this.browserProxy.setCategoryPermissionForOrigin( 106 this.browserProxy.setCategoryPermissionForOrigin(
102 this.site.origin, this.site.embeddingOrigin, this.category, value, 107 this.site.origin, this.site.embeddingOrigin, this.category, value,
103 this.site.incognito); 108 this.site.incognito);
104 }, 109 },
105 }); 110 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698