summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/resource_handle_impl.cc4
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc7
-rw-r--r--webkit/glue/weburlrequest.h8
-rw-r--r--webkit/glue/weburlrequest_impl.cc10
-rw-r--r--webkit/glue/weburlrequest_impl.h4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc3
6 files changed, 20 insertions, 16 deletions
diff --git a/webkit/glue/resource_handle_impl.cc b/webkit/glue/resource_handle_impl.cc
index 024836e..50541cb 100644
--- a/webkit/glue/resource_handle_impl.cc
+++ b/webkit/glue/resource_handle_impl.cc
@@ -412,9 +412,9 @@ bool ResourceHandleInternal::Start(
// TODO(abarth): These are wrong! I need to figure out how to get the right
// strings here. See: http://crbug.com/8706
std::string frame_origin =
- webkit_glue::StringToStdString(request_.mainDocumentURL().string());
+ webkit_glue::StringToStdString(request_.firstPartyForCookies().string());
std::string main_frame_origin =
- webkit_glue::StringToStdString(request_.mainDocumentURL().string());
+ webkit_glue::StringToStdString(request_.firstPartyForCookies().string());
// TODO(darin): is latin1 really correct here? It is if the strings are
// already ASCII (i.e., if they are already escaped properly).
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index c9b4b6b..c3dd259 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -224,15 +224,16 @@ void WebFrameLoaderClient::dispatchWillSendRequest(
// first-party request.
if (request.targetType() != ResourceRequest::TargetIsMainFrame &&
webframe_->frame()->document()) {
- request.setPolicyURL(webframe_->frame()->document()->policyBaseURL());
+ request.setPolicyURL(
+ webframe_->frame()->document()->firstPartyForCookies());
}
// FrameLoader::loadEmptyDocumentSynchronously() creates an empty document
// with no URL. We don't like that, so we'll rename it to about:blank.
if (request.url().isEmpty())
request.setURL(KURL("about:blank"));
- if (request.mainDocumentURL().isEmpty())
- request.setMainDocumentURL(KURL("about:blank"));
+ if (request.firstPartyForCookies().isEmpty())
+ request.setFirstPartyForCookies(KURL("about:blank"));
// Give the delegate a crack at the request.
WebViewImpl* webview = webframe_->GetWebViewImpl();
diff --git a/webkit/glue/weburlrequest.h b/webkit/glue/weburlrequest.h
index 6443c7c..31bc1cb 100644
--- a/webkit/glue/weburlrequest.h
+++ b/webkit/glue/weburlrequest.h
@@ -37,10 +37,10 @@ class WebRequest {
virtual GURL GetURL() const = 0;
virtual void SetURL(const GURL& url) = 0;
- // Get/set the main document URL, which may be different from the URL for a
- // subframe load.
- virtual GURL GetMainDocumentURL() const = 0;
- virtual void SetMainDocumentURL(const GURL& url) = 0;
+ // Get/set the URL of the first party for cookies, which may be different
+ // from the URL for a subframe load.
+ virtual GURL GetFirstPartyForCookies() const = 0;
+ virtual void SetFirstPartyForCookies(const GURL& url) = 0;
// Get/set the cache policy.
virtual WebRequestCachePolicy GetCachePolicy() const = 0;
diff --git a/webkit/glue/weburlrequest_impl.cc b/webkit/glue/weburlrequest_impl.cc
index 9a020ad..9954036 100644
--- a/webkit/glue/weburlrequest_impl.cc
+++ b/webkit/glue/weburlrequest_impl.cc
@@ -48,12 +48,14 @@ void WebRequestImpl::SetURL(const GURL& url) {
request_.setURL(webkit_glue::GURLToKURL(url));
}
-GURL WebRequestImpl::GetMainDocumentURL() const {
- return webkit_glue::KURLToGURL(request_.mainDocumentURL());
+GURL WebRequestImpl::GetFirstPartyForCookies() const {
+ return webkit_glue::KURLToGURL(
+ request_.resourceRequest().firstPartyForCookies());
}
-void WebRequestImpl::SetMainDocumentURL(const GURL& url) {
- request_.setMainDocumentURL(webkit_glue::GURLToKURL(url));
+void WebRequestImpl::SetFirstPartyForCookies(const GURL& url) {
+ request_.resourceRequest().setFirstPartyForCookies(
+ webkit_glue::GURLToKURL(url));
}
WebRequestCachePolicy WebRequestImpl::GetCachePolicy() const {
diff --git a/webkit/glue/weburlrequest_impl.h b/webkit/glue/weburlrequest_impl.h
index 207fbc3..5758504 100644
--- a/webkit/glue/weburlrequest_impl.h
+++ b/webkit/glue/weburlrequest_impl.h
@@ -20,8 +20,8 @@ class WebRequestImpl : public WebRequest {
virtual WebRequest* Clone() const;
virtual void SetURL(const GURL& url);
virtual GURL GetURL() const;
- virtual void SetMainDocumentURL(const GURL& url);
- virtual GURL GetMainDocumentURL() const;
+ virtual void SetFirstPartyForCookies(const GURL& url);
+ virtual GURL GetFirstPartyForCookies() const;
virtual WebRequestCachePolicy GetCachePolicy() const;
virtual void SetCachePolicy(WebRequestCachePolicy policy);
virtual std::string GetHttpMethod() const;
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 353f4fb..58e914d 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -794,7 +794,8 @@ void TestWebViewDelegate::UpdateAddressBar(WebView* webView) {
if (!dataSource)
return;
- SetAddressBarURL(dataSource->GetRequest().GetMainDocumentURL());
+ // TODO(abarth): This is wrong!
+ SetAddressBarURL(dataSource->GetRequest().GetFirstPartyForCookies());
}
void TestWebViewDelegate::LocationChangeDone(WebFrame* frame) {