diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 12:59:20 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 12:59:20 +0000 |
commit | 610ca838d7afb9c551bb186888e2ebf25ca913e7 (patch) | |
tree | 54368d99af30410f51fa7cdaec4c06bd8389a762 /chrome/common/render_messages.h | |
parent | 6d6fe593efe370ff53dbf9487fe393083162dbc6 (diff) | |
download | chromium_src-610ca838d7afb9c551bb186888e2ebf25ca913e7.zip chromium_src-610ca838d7afb9c551bb186888e2ebf25ca913e7.tar.gz chromium_src-610ca838d7afb9c551bb186888e2ebf25ca913e7.tar.bz2 |
Check for default content setting pattern when requiring user authorization for plug-ins.
We now check in the renderer if a plug-in is allowed by default, which is the case if the matching patterns are wildcards.
BUG=100581
TEST=see bug
Review URL: http://codereview.chromium.org/8334020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106270 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 7e09b6e..5a23d0e 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -19,6 +19,7 @@ #include "base/values.h" #include "build/build_config.h" #include "chrome/common/common_param_traits.h" +#include "chrome/common/content_settings_pattern.h" #include "chrome/common/instant_types.h" #include "chrome/common/nacl_types.h" #include "chrome/common/search_provider.h" @@ -102,6 +103,14 @@ struct ParamTraits<ContentSettings> { static void Log(const param_type& p, std::string* l); }; +template <> +struct ParamTraits<ContentSettingsPattern> { + typedef ContentSettingsPattern param_type; + static void Write(Message* m, const param_type& p); + static bool Read(const Message* m, void** iter, param_type* r); + static void Log(const param_type& p, std::string* l); +}; + } // namespace IPC #endif // CHROME_COMMON_RENDER_MESSAGES_H_ @@ -119,6 +128,16 @@ IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status) IPC_STRUCT_TRAITS_MEMBER(value) IPC_STRUCT_TRAITS_END() +IPC_STRUCT_TRAITS_BEGIN(ContentSettingsPattern::PatternParts) + IPC_STRUCT_TRAITS_MEMBER(scheme) + IPC_STRUCT_TRAITS_MEMBER(is_scheme_wildcard) + IPC_STRUCT_TRAITS_MEMBER(host) + IPC_STRUCT_TRAITS_MEMBER(has_domain_wildcard) + IPC_STRUCT_TRAITS_MEMBER(port) + IPC_STRUCT_TRAITS_MEMBER(is_port_wildcard) + IPC_STRUCT_TRAITS_MEMBER(path) +IPC_STRUCT_TRAITS_END() + IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore) IPC_STRUCT_TRAITS_MEMBER(boring_score) IPC_STRUCT_TRAITS_MEMBER(good_clipping) @@ -401,10 +420,12 @@ IPC_SYNC_MESSAGE_CONTROL4_1(ChromeViewHostMsg_AllowIndexedDB, // neither blocked nor white-listed, which means that it's allowed // by default and can still be blocked if it's non-sandboxed. // -IPC_SYNC_MESSAGE_CONTROL2_1(ChromeViewHostMsg_GetPluginContentSetting, +IPC_SYNC_MESSAGE_CONTROL2_3(ChromeViewHostMsg_GetPluginContentSetting, GURL /* policy_url */, std::string /* resource */, - ContentSetting /* setting */) + ContentSetting /* setting */, + ContentSettingsPattern /* primary pattern */, + ContentSettingsPattern /* secondary pattern */) // Return information about a plugin for the given URL and MIME type. // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows |