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/content_settings_pattern.cc | |
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/content_settings_pattern.cc')
-rw-r--r-- | chrome/common/content_settings_pattern.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc index b15f732..05a0fe9 100644 --- a/chrome/common/content_settings_pattern.cc +++ b/chrome/common/content_settings_pattern.cc @@ -10,11 +10,13 @@ #include "base/string_split.h" #include "base/string_util.h" #include "chrome/common/content_settings_pattern_parser.h" +#include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "net/base/dns_util.h" #include "net/base/net_util.h" #include "googleurl/src/gurl.h" #include "googleurl/src/url_canon.h" +#include "ipc/ipc_message_utils.h" namespace { @@ -368,6 +370,17 @@ ContentSettingsPattern::ContentSettingsPattern( is_valid_(valid) { } +void ContentSettingsPattern::WriteToMessage(IPC::Message* m) const { + IPC::WriteParam(m, is_valid_); + IPC::WriteParam(m, parts_); +} + +bool ContentSettingsPattern::ReadFromMessage(const IPC::Message* m, + void** iter) { + return IPC::ReadParam(m, iter, &is_valid_) && + IPC::ReadParam(m, iter, &parts_); +} + bool ContentSettingsPattern::Matches( const GURL& url) const { // An invalid pattern matches nothing. |