diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 00:34:27 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 00:34:27 +0000 |
commit | 65e82a56b3f1ca882db8c53f07781ecdc6cb7ece (patch) | |
tree | e224abcb3aa50320f55bf7a35bbf2e72ee0e0270 /chrome/common/plugin_messages.cc | |
parent | 52426e4c3b775666fa9fd52e1c52f8dbbbaadd49 (diff) | |
download | chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.zip chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.tar.gz chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.tar.bz2 |
Implement NPAPI HTTP Redirect handling. This basically supports the NPAPI URL redirect
notifications which are sent out from the browser while processing URL requests issued
by the plugin via the NPN_GetURLNotify and NPN_PostURLNotify APIs.
For more info please see https://wiki.mozilla.org/NPAPI:HTTPRedirectHandling
As part of this CL we also block cross origin 307 POST url redirects.
Test=Covered by NPAPI UI test GetURLRedirectNotification
Bug=63030,63698
Review URL: http://codereview.chromium.org/5228007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages.cc')
-rw-r--r-- | chrome/common/plugin_messages.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/plugin_messages.cc b/chrome/common/plugin_messages.cc index e152728..0434197 100644 --- a/chrome/common/plugin_messages.cc +++ b/chrome/common/plugin_messages.cc @@ -22,7 +22,8 @@ PluginMsg_Init_Params::~PluginMsg_Init_Params() { PluginHostMsg_URLRequest_Params::PluginHostMsg_URLRequest_Params() : notify_id(-1), - popups_allowed(false) { + popups_allowed(false), + notify_redirects(false) { } PluginHostMsg_URLRequest_Params::~PluginHostMsg_URLRequest_Params() { @@ -123,6 +124,7 @@ void ParamTraits<PluginHostMsg_URLRequest_Params>::Write(Message* m, WriteParam(m, p.buffer); WriteParam(m, p.notify_id); WriteParam(m, p.popups_allowed); + WriteParam(m, p.notify_redirects); } bool ParamTraits<PluginHostMsg_URLRequest_Params>::Read(const Message* m, @@ -134,7 +136,8 @@ bool ParamTraits<PluginHostMsg_URLRequest_Params>::Read(const Message* m, ReadParam(m, iter, &p->target) && ReadParam(m, iter, &p->buffer) && ReadParam(m, iter, &p->notify_id) && - ReadParam(m, iter, &p->popups_allowed); + ReadParam(m, iter, &p->popups_allowed) && + ReadParam(m, iter, &p->notify_redirects); } void ParamTraits<PluginHostMsg_URLRequest_Params>::Log(const param_type& p, @@ -151,6 +154,8 @@ void ParamTraits<PluginHostMsg_URLRequest_Params>::Log(const param_type& p, LogParam(p.notify_id, l); l->append(", "); LogParam(p.popups_allowed, l); + l->append(", "); + LogParam(p.notify_redirects, l); l->append(")"); } |