| Index: chrome/browser/resources/settings/site_settings/site_settings_category.js
|
| diff --git a/chrome/browser/resources/settings/site_settings/site_settings_category.js b/chrome/browser/resources/settings/site_settings/site_settings_category.js
|
| index 01b764c709e7768fc15c66762547c27bbac9b9b4..97f25d17851c3ccec8f91d281440d59e1b704aad 100644
|
| --- a/chrome/browser/resources/settings/site_settings/site_settings_category.js
|
| +++ b/chrome/browser/resources/settings/site_settings/site_settings_category.js
|
| @@ -62,11 +62,16 @@ Polymer({
|
| ],
|
|
|
| ready: function() {
|
| - // TODO(finnur): Handle dynamic routes, so that we can link directly into
|
| - // individual categories without having to first stop by the site settings
|
| - // page to select a category.
|
| this.$.blockList.categorySubtype = settings.PermissionValues.BLOCK;
|
| this.$.allowList.categorySubtype = settings.PermissionValues.ALLOW;
|
| +
|
| + // See if the URL contains a specific category (only happens if the user
|
| + // navigates directly to the category page).
|
| + var urlParts = window.location.href.split('/');
|
| + var categoryTextId = urlParts[urlParts.length - 1];
|
| + var category = this.computeCategoryFromTextId(categoryTextId);
|
| + if (category != -1)
|
| + this.category = category;
|
| },
|
|
|
| /**
|
| @@ -84,7 +89,7 @@ Polymer({
|
| settings.PermissionValues.ALLOW :
|
| settings.PermissionValues.BLOCK);
|
| break;
|
| - case settings.ContentSettingsTypes.NOTIFICATION:
|
| + case settings.ContentSettingsTypes.NOTIFICATIONS:
|
| case settings.ContentSettingsTypes.GEOLOCATION:
|
| case settings.ContentSettingsTypes.CAMERA:
|
| case settings.ContentSettingsTypes.MIC:
|
|
|