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

Unified Diff: chrome/browser/resources/settings/site_settings_page/site_settings_page.js

Issue 2021343003: MD Site Settings: Add five new top level categories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback and add icons Created 4 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_page/site_settings_page.js
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.js b/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
index a16c45dcb405eccb02e87b04cc2e4d9f2844e276..a757f08290cc8cbce1c632da11427b37ecb6de6e 100644
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
@@ -35,18 +35,25 @@ Polymer({
this.ALL_SITES = settings.ALL_SITES;
// Look up the default value for each category and show it.
+ this.setDefaultValue_(this.ContentSettingsTypes.AUTOMATIC_DOWNLOADS,
+ '#automaticDownloads');
+ this.setDefaultValue_(this.ContentSettingsTypes.BACKGROUND_SYNC,
+ '#backgroundSync');
+ this.setDefaultValue_(this.ContentSettingsTypes.CAMERA, '#camera');
this.setDefaultValue_(this.ContentSettingsTypes.COOKIES, '#cookies');
this.setDefaultValue_(this.ContentSettingsTypes.GEOLOCATION,
'#geolocation');
- this.setDefaultValue_(this.ContentSettingsTypes.CAMERA, '#camera');
- this.setDefaultValue_(this.ContentSettingsTypes.MIC, '#mic');
+ this.setDefaultValue_(this.ContentSettingsTypes.IMAGES, '#images');
this.setDefaultValue_(this.ContentSettingsTypes.JAVASCRIPT,
'#javascript');
- this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups');
+ this.setDefaultValue_(this.ContentSettingsTypes.KEYGEN, '#keygen');
+ this.setDefaultValue_(this.ContentSettingsTypes.MIC, '#mic');
this.setDefaultValue_(this.ContentSettingsTypes.NOTIFICATIONS,
'#notifications');
- this.setDefaultValue_(this.ContentSettingsTypes.IMAGES, '#images');
-
+ this.setDefaultValue_(this.ContentSettingsTypes.PLUGINS, '#plugins');
+ this.setDefaultValue_(this.ContentSettingsTypes.POPUPS, '#popups');
+ this.setDefaultValue_(this.ContentSettingsTypes.UNSANDBOXED_PLUGINS,
+ '#unsandboxedPlugins');
},
setDefaultValue_: function(category, id) {
@@ -63,8 +70,8 @@ Polymer({
* @param {!Event} event The tap event.
*/
onTapCategory: function(event) {
- var category = parseInt(event.currentTarget.getAttribute('category'), 10);
- if (category == -1) {
+ var category = event.currentTarget.getAttribute('category');
+ if (category == settings.ALL_SITES) {
this.currentRoute = {
page: this.currentRoute.page,
section: 'privacy',
« no previous file with comments | « chrome/browser/resources/settings/site_settings_page/site_settings_page.html ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698