| Index: chrome/browser/ui/webui/options/website_settings_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/website_settings_handler.cc b/chrome/browser/ui/webui/options/website_settings_handler.cc
|
| index 38405e1ba596d527d95554942447fdf646753bdb..fa73e67595801f21a30891817523d406a106b7b8 100644
|
| --- a/chrome/browser/ui/webui/options/website_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/website_settings_handler.cc
|
| @@ -38,10 +38,15 @@ const int kHttpsPort = 443;
|
| const char kPreferencesSource[] = "preference";
|
| const char kStorage[] = "storage";
|
| const ContentSettingsType kValidTypes[] = {
|
| + CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
|
| + CONTENT_SETTINGS_TYPE_COOKIES,
|
| CONTENT_SETTINGS_TYPE_GEOLOCATION,
|
| + CONTENT_SETTINGS_TYPE_IMAGES,
|
| + CONTENT_SETTINGS_TYPE_JAVASCRIPT,
|
| CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
|
| CONTENT_SETTINGS_TYPE_MEDIASTREAM,
|
| - CONTENT_SETTINGS_TYPE_COOKIES};
|
| + CONTENT_SETTINGS_TYPE_PLUGINS,
|
| + CONTENT_SETTINGS_TYPE_POPUPS};
|
| const size_t kValidTypesLength = arraysize(kValidTypes);
|
|
|
| } // namespace
|
| @@ -71,12 +76,19 @@ void WebsiteSettingsHandler::GetLocalizedValues(
|
| {"websitesLabelStorage", IDS_WEBSITE_SETTINGS_TYPE_STORAGE},
|
| {"websitesLabelBattery", IDS_WEBSITE_SETTINGS_TYPE_BATTERY},
|
| {"websitesCookiesDescription", IDS_WEBSITE_SETTINGS_COOKIES_DESCRIPTION},
|
| - {"websitesLocationDescription",
|
| + {"websitesGeolocationDescription",
|
| IDS_WEBSITE_SETTINGS_LOCATION_DESCRIPTION},
|
| {"websitesMediastreamDescription",
|
| IDS_WEBSITE_SETTINGS_MEDIASTREAM_DESCRIPTION},
|
| {"websitesNotificationsDescription",
|
| IDS_WEBSITE_SETTINGS_NOTIFICATIONS_DESCRIPTION},
|
| + {"websitesMultipleautomaticdownloadsDescription",
|
| + IDS_WEBSITE_SETTINGS_DOWNLOAD_DESCRIPTION},
|
| + {"websitesPluginsDescription", IDS_WEBSITE_SETTINGS_PLUGINS_DESCRIPTION},
|
| + {"websitesPopupsDescription", IDS_WEBSITE_SETTINGS_POPUPS_DESCRIPTION},
|
| + {"websitesJavascriptDescription",
|
| + IDS_WEBSITE_SETTINGS_JAVASCRIPT_DESCRIPTION},
|
| + {"websitesImagesDescription", IDS_WEBSITE_SETTINGS_IMAGES_DESCRIPTION},
|
| {"websitesButtonClear", IDS_WEBSITE_SETTINGS_STORAGE_CLEAR_BUTTON},
|
| {"websitesButtonStop", IDS_WEBSITE_SETTINGS_BATTERY_STOP_BUTTON},
|
| };
|
| @@ -347,18 +359,10 @@ void WebsiteSettingsHandler::HandleSetOriginPermission(
|
| ContentSettingsPattern primary_pattern;
|
| ContentSettingsPattern secondary_pattern;
|
| switch (settings_type) {
|
| - case CONTENT_SETTINGS_TYPE_COOKIES:
|
| - primary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| - secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| - break;
|
| case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
|
| primary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| secondary_pattern = ContentSettingsPattern::Wildcard();
|
| break;
|
| - case CONTENT_SETTINGS_TYPE_GEOLOCATION:
|
| - primary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| - secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| - break;
|
| case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
|
| primary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| secondary_pattern = ContentSettingsPattern::Wildcard();
|
| @@ -373,9 +377,19 @@ void WebsiteSettingsHandler::HandleSetOriginPermission(
|
| std::string(),
|
| setting);
|
| return;
|
| + case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS:
|
| + case CONTENT_SETTINGS_TYPE_COOKIES:
|
| + case CONTENT_SETTINGS_TYPE_GEOLOCATION:
|
| + case CONTENT_SETTINGS_TYPE_IMAGES:
|
| + case CONTENT_SETTINGS_TYPE_JAVASCRIPT:
|
| + case CONTENT_SETTINGS_TYPE_PLUGINS:
|
| + case CONTENT_SETTINGS_TYPE_POPUPS:
|
| + primary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| + secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(last_site_);
|
| + break;
|
| default:
|
| NOTREACHED() << "Content settings type not yet supported.";
|
| - break;
|
| + return;
|
| }
|
|
|
| content_settings::SettingInfo info;
|
|
|