summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 00:51:05 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 00:51:05 +0000
commit0e8eabb0f29f0efb24559a51cf9b0c89dbac903d (patch)
tree2651641a8361e2a4f004e12dfc2744eb19237e23 /webkit
parentddd968b875f51efee01401fd307f4c691dfd6a9a (diff)
downloadchromium_src-0e8eabb0f29f0efb24559a51cf9b0c89dbac903d.zip
chromium_src-0e8eabb0f29f0efb24559a51cf9b0c89dbac903d.tar.gz
chromium_src-0e8eabb0f29f0efb24559a51cf9b0c89dbac903d.tar.bz2
Specify the first-party-for-cookies URL for HTTP requests
issued by plugins. Fix formatting nits. R=abarth,darin,eroman BUG=36957 TEST=none Review URL: http://codereview.chromium.org/601038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webplugin_impl.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index adf5f64..c5877e3 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -557,6 +557,8 @@ WebPluginImpl::RoutingStatus WebPluginImpl::RouteToFrame(
SetReferrer(&request, referrer_flag);
request.setHTTPMethod(WebString::fromUTF8(method));
+ // TODO(wtc): add a WebDocument::firstPartyForCookies method.
+ request.setFirstPartyForCookies(webframe_->top()->url());
if (len > 0) {
if (!SetPostData(&request, buf, len)) {
// Uhoh - we're in trouble. There isn't a good way
@@ -849,7 +851,7 @@ void WebPluginImpl::SetContainer(WebPluginContainer* container) {
}
void WebPluginImpl::HandleURLRequest(const char* url,
- const char *method,
+ const char* method,
const char* target,
const char* buf,
unsigned int len,
@@ -862,7 +864,7 @@ void WebPluginImpl::HandleURLRequest(const char* url,
}
void WebPluginImpl::HandleURLRequestInternal(const char* url,
- const char *method,
+ const char* method,
const char* target,
const char* buf,
unsigned int len,
@@ -952,6 +954,8 @@ bool WebPluginImpl::InitiateHTTPRequest(unsigned long resource_id,
info.client = client;
info.request.initialize();
info.request.setURL(url);
+ // TODO(wtc): add a WebDocument::firstPartyForCookies method.
+ info.request.setFirstPartyForCookies(webframe_->top()->url());
info.request.setRequestorProcessID(delegate_->GetProcessId());
info.request.setTargetType(WebURLRequest::TargetIsObject);
info.request.setHTTPMethod(WebString::fromUTF8(method));