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

Unified Diff: chrome/browser/resources/settings/site_settings/constants.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: Address feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_details_permission.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/site_settings/constants.js
diff --git a/chrome/browser/resources/settings/site_settings/constants.js b/chrome/browser/resources/settings/site_settings/constants.js
index 55f871efa94add5777d3cf10e878e45d6dcc4ff0..0725fa64ecd6c2e7bfdb0cc6097f65f6480418de 100644
--- a/chrome/browser/resources/settings/site_settings/constants.js
+++ b/chrome/browser/resources/settings/site_settings/constants.js
@@ -24,22 +24,14 @@ cr.define('settings', function() {
};
/**
- * Contains the possible values for a given contentSettingsType.
- * @enum {number}
- */
- var PermissionValues = {
- ALLOW: 1,
- BLOCK: 2,
- ASK: 3,
- };
-
- /**
* Contains the possible string values for a given contentSettingsType.
* @enum {string}
*/
- var PermissionStringValues = {
+ var PermissionValues = {
+ DEFAULT: 'default',
ALLOW: 'allow',
BLOCK: 'block',
+ ASK: 'ask',
};
/**
@@ -50,14 +42,13 @@ cr.define('settings', function() {
/**
* An invalid subtype value.
- * @const {number}
+ * @const {string}
*/
- var INVALID_CATEGORY_SUBTYPE = -1;
+ var INVALID_CATEGORY_SUBTYPE = '';
return {
ContentSettingsTypes: ContentSettingsTypes,
PermissionValues: PermissionValues,
- PermissionStringValues: PermissionStringValues,
ALL_SITES: ALL_SITES,
INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE,
};
« no previous file with comments | « no previous file | chrome/browser/resources/settings/site_settings/site_details_permission.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698