diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-23 17:56:25 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-23 17:56:25 +0000 |
commit | cccf9093e5f184e3a3d8667f0ab664864d401ab7 (patch) | |
tree | d43bc2ccef5436b5ac2d66f466e33910a6333d4f /chrome/common/render_messages.h | |
parent | 6727ddddb2d81a5e94844873ccdcc6de4b1987ef (diff) | |
download | chromium_src-cccf9093e5f184e3a3d8667f0ab664864d401ab7.zip chromium_src-cccf9093e5f184e3a3d8667f0ab664864d401ab7.tar.gz chromium_src-cccf9093e5f184e3a3d8667f0ab664864d401ab7.tar.bz2 |
Implement granular cross-origin XHR for extensions.
I left the temporary hack that allows all origins until we are
ready to break everything all at once.
Also, I still need to devise some way to test this.
BUG=12129
Review URL: http://codereview.chromium.org/173166
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24089 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r-- | chrome/common/render_messages.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index fcbf0a4..aeda43d 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -17,6 +17,7 @@ #include "chrome/common/common_param_traits.h" #include "chrome/common/css_colors.h" #include "chrome/common/extensions/update_manifest.h" +#include "chrome/common/extensions/url_pattern.h" #include "chrome/common/filter_policy.h" #include "chrome/common/modal_dialog_event.h" #include "chrome/common/page_transition_types.h" @@ -2103,6 +2104,25 @@ struct ParamTraits<UpdateManifest::Result> { } }; +// Traits for URLPattern. +template <> +struct ParamTraits<URLPattern> { + typedef URLPattern param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.GetAsString()); + } + static bool Read(const Message* m, void** iter, param_type* p) { + std::string spec; + if (!ReadParam(m, iter, &spec)) + return false; + + return p->Parse(spec); + } + static void Log(const param_type& p, std::wstring* l) { + LogParam(p.GetAsString(), l); + } +}; + } // namespace IPC |