diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 11:56:56 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-16 11:56:56 +0000 |
commit | edece2111f69da5328faa06ca23b760016a62bcd (patch) | |
tree | 7fe93400714773d399579a3fdfea22559e7490ce /chrome/browser/content_settings/host_content_settings_map.cc | |
parent | 2676cd5647572899d3672edf04bf48c65ced5b71 (diff) | |
download | chromium_src-edece2111f69da5328faa06ca23b760016a62bcd.zip chromium_src-edece2111f69da5328faa06ca23b760016a62bcd.tar.gz chromium_src-edece2111f69da5328faa06ca23b760016a62bcd.tar.bz2 |
Take script URLs into account when applying script content settings.
Transmit script content settings to the renderer. Use the script URL as the secondary URL
for the content setting rules.
This CL contains the functionality of the following 2 CLs, hopefully without performance
regressions:
http://codereview.chromium.org/8409006
http://codereview.chromium.org/8498007
BUG=90840
TEST=ChromeRenderViewTest.ContentSettings(Allow|Block)Scripts
Review URL: http://codereview.chromium.org/8538004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings/host_content_settings_map.cc')
-rw-r--r-- | chrome/browser/content_settings/host_content_settings_map.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc index b0baa04..2c09ad2 100644 --- a/chrome/browser/content_settings/host_content_settings_map.cc +++ b/chrome/browser/content_settings/host_content_settings_map.cc @@ -163,16 +163,6 @@ ContentSetting HostContentSettingsMap::GetDefaultContentSetting( return CONTENT_SETTING_DEFAULT; } -ContentSettings HostContentSettingsMap::GetDefaultContentSettings() const { - ContentSettings output(CONTENT_SETTING_DEFAULT); - for (int i = 0; i < CONTENT_SETTINGS_NUM_TYPES; ++i) { - if (!ContentTypeHasCompoundValue(ContentSettingsType(i))) - output.settings[i] = GetDefaultContentSetting(ContentSettingsType(i), - NULL); - } - return output; -} - ContentSetting HostContentSettingsMap::GetContentSetting( const GURL& primary_url, const GURL& secondary_url, @@ -183,23 +173,6 @@ ContentSetting HostContentSettingsMap::GetContentSetting( return content_settings::ValueToContentSetting(value.get()); } -ContentSettings HostContentSettingsMap::GetContentSettings( - const GURL& primary_url) const { - ContentSettings output; - // If we require a resource identifier, set the content settings to default, - // otherwise make the defaults explicit. Values for content type - // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE can't be mapped to the type - // |ContentSetting|. So we ignore them here. - for (int j = 0; j < CONTENT_SETTINGS_NUM_TYPES; ++j) { - ContentSettingsType type = ContentSettingsType(j); - if (!ContentTypeHasCompoundValue(type)) { - output.settings[j] = GetContentSetting( - primary_url, primary_url, ContentSettingsType(j), std::string()); - } - } - return output; -} - void HostContentSettingsMap::GetSettingsForOneType( ContentSettingsType content_type, const std::string& resource_identifier, |