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

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

Issue 1882793002: Site Settings: Use only string values for permissions on the JS side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 A helper object used from the "Site Settings" section to 6 * @fileoverview A helper object used from the "Site Settings" section to
7 * interact with the content settings prefs. 7 * interact with the content settings prefs.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 /** 56 /**
57 * Gets the exceptions (site list) for a particular category. 57 * Gets the exceptions (site list) for a particular category.
58 * @param {number} contentType The category to change. 58 * @param {number} contentType The category to change.
59 * @return {Promise<Array<SiteException>>} 59 * @return {Promise<Array<SiteException>>}
60 */ 60 */
61 getExceptionList: function(contentType) {}, 61 getExceptionList: function(contentType) {},
62 62
63 /** 63 /**
64 * Resets the category permission for a given origin (expressed as primary 64 * Resets the category permission for a given origin (expressed as primary
65 * and secondary patterns). 65 * and secondary patterns).
66 * @param {!string} primaryPattern The origin to change (primary pattern). 66 * @param {!string} primaryPattern The origin to change (primary pattern).
tommycli 2016/04/13 18:21:29 nit: These primitive types, string, number are non
Finnur 2016/04/13 21:44:55 Done!
67 * @param {!string} secondaryPattern The embedding origin to change 67 * @param {!string} secondaryPattern The embedding origin to change
68 * (secondary pattern). 68 * (secondary pattern).
69 * @param {!number} contentType The category to change. 69 * @param {!number} contentType The category to change.
70 */ 70 */
71 resetCategoryPermissionForOrigin: function( 71 resetCategoryPermissionForOrigin: function(
72 primaryPattern, secondaryPattern, contentType) {}, 72 primaryPattern, secondaryPattern, contentType) {},
73 73
74 /** 74 /**
75 * Sets the category permission for a given origin (expressed as primary 75 * Sets the category permission for a given origin (expressed as primary
76 * and secondary patterns). 76 * and secondary patterns).
77 * @param {!string} primaryPattern The origin to change (primary pattern). 77 * @param {!string} primaryPattern The origin to change (primary pattern).
78 * @param {!string} secondaryPattern The embedding origin to change 78 * @param {!string} secondaryPattern The embedding origin to change
79 * (secondary pattern). 79 * (secondary pattern).
80 * @param {!number} contentType The category to change. 80 * @param {!number} contentType The category to change.
81 * @param {!number} value The value to change the permission to. 81 * @param {!string} value The value to change the permission to.
82 */ 82 */
83 setCategoryPermissionForOrigin: function( 83 setCategoryPermissionForOrigin: function(
84 primaryPattern, secondaryPattern, contentType, value) {}, 84 primaryPattern, secondaryPattern, contentType, value) {},
85 }; 85 };
86 86
87 /** 87 /**
88 * @constructor 88 * @constructor
89 * @implements {SiteSettingsPrefsBrowserProxy} 89 * @implements {SiteSettingsPrefsBrowserProxy}
90 */ 90 */
91 function SiteSettingsPrefsBrowserProxyImpl() {} 91 function SiteSettingsPrefsBrowserProxyImpl() {}
(...skipping 30 matching lines...) Expand all
122 primaryPattern, secondaryPattern, contentType, value) { 122 primaryPattern, secondaryPattern, contentType, value) {
123 chrome.send('setCategoryPermissionForOrigin', 123 chrome.send('setCategoryPermissionForOrigin',
124 [primaryPattern, secondaryPattern, contentType, value]); 124 [primaryPattern, secondaryPattern, contentType, value]);
125 }, 125 },
126 }; 126 };
127 127
128 return { 128 return {
129 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl, 129 SiteSettingsPrefsBrowserProxyImpl: SiteSettingsPrefsBrowserProxyImpl,
130 }; 130 };
131 }); 131 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698