summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 10:49:49 +0000
committermarja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-08 10:49:49 +0000
commit979b0b80931a7e0a3442877f94c8e2838ce4c848 (patch)
tree5242bd5e68cf604811bfdba97e72ac44cda8059a /chrome/common
parent9d43cd1f7d78bcb696401bd1ab7359a8d76fde81 (diff)
downloadchromium_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/common')
-rw-r--r--chrome/common/content_settings.cc4
-rw-r--r--chrome/common/content_settings.h7
-rw-r--r--chrome/common/render_messages.h11
3 files changed, 19 insertions, 3 deletions
diff --git a/chrome/common/content_settings.cc b/chrome/common/content_settings.cc
index ecf26f8..cd30d6c 100644
--- a/chrome/common/content_settings.cc
+++ b/chrome/common/content_settings.cc
@@ -33,3 +33,7 @@ ContentSettingPatternSource::ContentSettingPatternSource(
incognito(incognito) {}
ContentSettingPatternSource::ContentSettingPatternSource() {}
+
+RendererContentSettingRules::RendererContentSettingRules() {}
+
+RendererContentSettingRules::~RendererContentSettingRules() {}
diff --git a/chrome/common/content_settings.h b/chrome/common/content_settings.h
index 2c7e5c2..87f5bc1 100644
--- a/chrome/common/content_settings.h
+++ b/chrome/common/content_settings.h
@@ -51,4 +51,11 @@ struct ContentSettingPatternSource {
typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType;
+struct RendererContentSettingRules {
+ RendererContentSettingRules();
+ ~RendererContentSettingRules();
+ ContentSettingsForOneType image_rules;
+ ContentSettingsForOneType script_rules;
+};
+
#endif // CHROME_COMMON_CONTENT_SETTINGS_H_
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 1d7b41d..89e395e 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -148,6 +148,11 @@ IPC_STRUCT_TRAITS_BEGIN(ContentSettingPatternSource)
IPC_STRUCT_TRAITS_MEMBER(incognito)
IPC_STRUCT_TRAITS_END()
+IPC_STRUCT_TRAITS_BEGIN(RendererContentSettingRules)
+ IPC_STRUCT_TRAITS_MEMBER(image_rules)
+ IPC_STRUCT_TRAITS_MEMBER(script_rules)
+IPC_STRUCT_TRAITS_END()
+
IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
IPC_STRUCT_TRAITS_MEMBER(boring_score)
IPC_STRUCT_TRAITS_MEMBER(good_clipping)
@@ -245,9 +250,9 @@ IPC_MESSAGE_CONTROL2(ChromeViewMsg_SetContentSettingsForCurrentURL,
IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetDefaultContentSettings,
ContentSettings /* content_settings */)
-// Set the content settings for images.
-IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetImageSettingRules,
- ContentSettingsForOneType /* rules */)
+// Set the content setting rules stored by the renderer.
+IPC_MESSAGE_CONTROL1(ChromeViewMsg_SetContentSettingRules,
+ RendererContentSettingRules /* rules */)
// Tells the render view to load all blocked plugins.
IPC_MESSAGE_ROUTED0(ChromeViewMsg_LoadBlockedPlugins)