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

Unified Diff: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js

Issue 2936003003: MD Settings: Set all content setting values in Site Details Javascript. (Closed)
Patch Set: Convert getCategoryPermissionForOrigin to getOriginPermissions Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index e335cdfbbb16c8d372b4050ffb1aa32be9299e1b..925f3ff0eb946b00e8760206e7bfe5f95377f8a5 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -19,7 +19,7 @@ var ContentSettingProvider = {
};
/**
- * The site exception information passed form the C++ handler.
+ * The site exception information passed from the C++ handler.
* See also: SiteException.
* @typedef {{embeddingOrigin: string,
* embeddingDisplayName: string,
@@ -128,13 +128,6 @@ cr.define('settings', function() {
getExceptionList(contentType) {}
/**
- * Gets the exception details for a particular site.
- * @param {string} site The name of the site.
- * @return {!Promise<!RawSiteException>}
- */
- getSiteDetails(site) {}
-
- /**
* Resets the category permission for a given origin (expressed as primary
* and secondary patterns).
* @param {string} primaryPattern The origin to change (primary pattern).
@@ -148,6 +141,17 @@ cr.define('settings', function() {
primaryPattern, secondaryPattern, contentType, incognito) {}
/**
+ * Gets a list of category permissions for a given origin. Note that this
+ * may be different to the results retrieved by getExceptionList(), since it
+ * combines different sources of data to get a permission's value.
+ * @param {string} origin The origin to look up permissions for.
+ * @param {Array<string>} contentTypes A list of categories to retrieve
dschuyler 2017/06/28 23:55:52 Let's insist that Array is not null: @param {!Arra
Patti Lor 2017/06/29 02:11:07 Done.
+ * the ContentSetting for.
+ * @return {!Promise<!NodeList<!RawSiteException>>}
+ */
+ getOriginPermissions(origin, contentTypes) {}
+
+ /**
* Sets the category permission for a given origin (expressed as primary
* and secondary patterns).
* @param {string} primaryPattern The origin to change (primary pattern).
@@ -310,11 +314,6 @@ cr.define('settings', function() {
}
/** @override */
- getSiteDetails(site) {
- return cr.sendWithPromise('getSiteDetails', site);
- }
-
- /** @override */
resetCategoryPermissionForOrigin(
primaryPattern, secondaryPattern, contentType, incognito) {
chrome.send(
@@ -323,6 +322,11 @@ cr.define('settings', function() {
}
/** @override */
+ getOriginPermissions(origin, contentTypes) {
+ return cr.sendWithPromise('getOriginPermissions', origin, contentTypes);
+ }
+
+ /** @override */
setCategoryPermissionForOrigin(
primaryPattern, secondaryPattern, contentType, value, incognito) {
// TODO(dschuyler): It may be incorrect for JS to send the embeddingOrigin

Powered by Google App Engine
This is Rietveld 408576698