From cccf9093e5f184e3a3d8667f0ab664864d401ab7 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Sun, 23 Aug 2009 17:56:25 +0000 Subject: 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 --- chrome/common/render_messages.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'chrome/common/render_messages.h') 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 { } }; +// Traits for URLPattern. +template <> +struct ParamTraits { + 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 -- cgit v1.1