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

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

Issue 2468363005: [MD settings] show blocked sites even when category is blocked (Closed)
Patch Set: unit test changes Created 4 years, 1 month 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/constants.js
diff --git a/chrome/browser/resources/settings/site_settings/constants.js b/chrome/browser/resources/settings/site_settings/constants.js
index e3961103a0fd57e58709aa83dc32831e895e1e0f..bd07ceb51e85fbd766908889aa2069fc9d1a79cf 100644
--- a/chrome/browser/resources/settings/site_settings/constants.js
+++ b/chrome/browser/resources/settings/site_settings/constants.js
@@ -2,64 +2,60 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-cr.define('settings', function() {
- /**
- * All possible contentSettingsTypes that we currently support configuring in
- * the UI. Both top-level categories and content settings that represent
- * individual permissions under Site Details should appear here. This is a
- * subset of the constants found in site_settings_helper.cc and the values
- * should be kept in sync.
- * @enum {string}
- */
- var ContentSettingsTypes = {
- COOKIES: 'cookies',
- IMAGES: 'images',
- JAVASCRIPT: 'javascript',
- PLUGINS: 'plugins',
- POPUPS: 'popups',
- GEOLOCATION: 'location',
- NOTIFICATIONS: 'notifications',
- FULLSCREEN: 'fullscreen',
- MIC: 'media-stream-mic',
- CAMERA: 'media-stream-camera',
- PROTOCOL_HANDLERS: 'register-protocol-handler',
- UNSANDBOXED_PLUGINS: 'ppapi-broker',
- AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
- KEYGEN: 'keygen',
- BACKGROUND_SYNC: 'background-sync',
- USB_DEVICES: 'usb-chooser-data',
- ZOOM_LEVELS: 'zoom-levels',
- };
+cr.exportPath('settings');
- /**
- * Contains the possible string values for a given contentSettingsType.
- * @enum {string}
- */
- var PermissionValues = {
- DEFAULT: 'default',
- ALLOW: 'allow',
- BLOCK: 'block',
- ASK: 'ask',
- SESSION_ONLY: 'session_only',
- IMPORTANT_CONTENT: 'detect_important_content',
- };
+/**
+ * All possible contentSettingsTypes that we currently support configuring in
+ * the UI. Both top-level categories and content settings that represent
+ * individual permissions under Site Details should appear here. This is a
+ * subset of the constants found in site_settings_helper.cc and the values
+ * should be kept in sync.
+ * @enum {string}
+ */
+settings.ContentSettingsTypes = {
+ COOKIES: 'cookies',
+ IMAGES: 'images',
+ JAVASCRIPT: 'javascript',
+ PLUGINS: 'plugins',
+ POPUPS: 'popups',
+ GEOLOCATION: 'location',
+ NOTIFICATIONS: 'notifications',
+ FULLSCREEN: 'fullscreen',
+ MIC: 'media-stream-mic',
+ CAMERA: 'media-stream-camera',
+ PROTOCOL_HANDLERS: 'register-protocol-handler',
+ UNSANDBOXED_PLUGINS: 'ppapi-broker',
+ AUTOMATIC_DOWNLOADS: 'multiple-automatic-downloads',
+ KEYGEN: 'keygen',
+ BACKGROUND_SYNC: 'background-sync',
+ USB_DEVICES: 'usb-chooser-data',
+ ZOOM_LEVELS: 'zoom-levels',
+};
- /**
- * A category value to use for the All Sites list.
- * @const {string}
- */
- var ALL_SITES = 'all-sites';
+/**
+ * Contains the possible string values for a given contentSettingsType.
+ * @enum {string}
+ *
+ * TODO(dschuyler): This should be rename as ContentSetting to maintain
+ * nomenclature with C++.
+ */
+settings.PermissionValues = {
+ DEFAULT: 'default',
+ ALLOW: 'allow',
+ BLOCK: 'block',
+ ASK: 'ask',
+ SESSION_ONLY: 'session_only',
+ IMPORTANT_CONTENT: 'detect_important_content',
+};
- /**
- * An invalid subtype value.
- * @const {string}
- */
- var INVALID_CATEGORY_SUBTYPE = '';
+/**
+ * A category value to use for the All Sites list.
+ * @const {string}
+ */
+settings.ALL_SITES = 'all-sites';
- return {
- ContentSettingsTypes: ContentSettingsTypes,
- PermissionValues: PermissionValues,
- ALL_SITES: ALL_SITES,
- INVALID_CATEGORY_SUBTYPE: INVALID_CATEGORY_SUBTYPE,
- };
-});
+/**
+ * An invalid subtype value.
+ * @const {string}
+ */
+settings.INVALID_CATEGORY_SUBTYPE = '';

Powered by Google App Engine
This is Rietveld 408576698