diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 10:49:49 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 10:49:49 +0000 |
commit | 979b0b80931a7e0a3442877f94c8e2838ce4c848 (patch) | |
tree | 5242bd5e68cf604811bfdba97e72ac44cda8059a /chrome/browser/chrome_content_browser_client.cc | |
parent | 9d43cd1f7d78bcb696401bd1ab7359a8d76fde81 (diff) | |
download | chromium_src-979b0b80931a7e0a3442877f94c8e2838ce4c848.zip chromium_src-979b0b80931a7e0a3442877f94c8e2838ce4c848.tar.gz chromium_src-979b0b80931a7e0a3442877f94c8e2838ce4c848.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.
BUG=90840
TEST=ChromeRenderViewTest.ContentSettings(Allow|Block)Scripts
Review URL: http://codereview.chromium.org/8409006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109005 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_content_browser_client.cc')
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 210e28a..71eef51 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -14,6 +14,7 @@ #include "chrome/browser/chrome_plugin_message_filter.h" #include "chrome/browser/chrome_quota_permission_context.h" #include "chrome/browser/chrome_worker_message_filter.h" +#include "chrome/browser/content_settings/content_settings_utils.h" #include "chrome/browser/content_settings/cookie_settings.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" #include "chrome/browser/download/download_util.h" @@ -301,10 +302,10 @@ void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( profile->IsOffTheRecord())); SendExtensionWebRequestStatusToHost(host); - ContentSettingsForOneType settings; - HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); - map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); - host->Send(new ChromeViewMsg_SetImageSettingRules(settings)); + + RendererContentSettingRules rules; + GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); + host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); } void ChromeContentBrowserClient::PluginProcessHostCreated( |