diff options
23 files changed, 100 insertions, 85 deletions
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc index cd5af7b..53dfe47 100644 --- a/chrome/browser/plugin_process_host.cc +++ b/chrome/browser/plugin_process_host.cc @@ -481,7 +481,7 @@ void PluginProcessHost::OnGetCookies(uint32 request_context, if (!context) context = Profile::GetDefaultRequestContext(); - // Note: We don't have a policy_url check because plugins bypass the + // Note: We don't have a first_party_for_cookies check because plugins bypass // third-party cookie blocking. *cookies = context->cookie_store()->GetCookies(url); } diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc index 785d396..fc57748 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc @@ -335,7 +335,7 @@ void ResourceDispatcherHost::BeginRequest( // Construct the request. URLRequest* request = new URLRequest(request_data.url, this); request->set_method(request_data.method); - request->set_policy_url(request_data.policy_url); + request->set_first_party_for_cookies(request_data.first_party_for_cookies); request->set_referrer(request_data.referrer.spec()); request->SetExtraRequestHeaders(request_data.headers); request->set_load_flags(request_data.load_flags); diff --git a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc index 6278d3e..3b8a575 100644 --- a/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc +++ b/chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc @@ -36,7 +36,7 @@ static ViewHostMsg_Resource_Request CreateResourceRequest(const char* method, ViewHostMsg_Resource_Request request; request.method = std::string(method); request.url = url; - request.policy_url = url; // bypass third-party cookie blocking + request.first_party_for_cookies = url; // bypass third-party cookie blocking // init the rest to default values to prevent getting UMR. request.frame_origin = "null"; request.main_frame_origin = "null"; diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h index 9f763f7..bc156c7 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/resource_message_filter.h @@ -104,9 +104,11 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, void OnMsgCreateWindow(int opener_id, bool user_gesture, int* route_id, ModalDialogEvent* modal_dialog_event); void OnMsgCreateWidget(int opener_id, bool activatable, int* route_id); - void OnSetCookie(const GURL& url, const GURL& policy_url, + void OnSetCookie(const GURL& url, + const GURL& first_party_for_cookies, const std::string& cookie); - void OnGetCookies(const GURL& url, const GURL& policy_url, + void OnGetCookies(const GURL& url, + const GURL& first_party_for_cookies, std::string* cookies); void OnGetDataDir(std::wstring* data_dir); void OnPluginMessage(const FilePath& plugin_path, diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h index 80eac49..d02c6be 100644 --- a/chrome/common/plugin_messages_internal.h +++ b/chrome/common/plugin_messages_internal.h @@ -243,12 +243,12 @@ IPC_BEGIN_MESSAGES(PluginHost) IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, GURL /* url */, - GURL /* policy_url */, + GURL /* first_party_for_cookies */, std::string /* cookie */) IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, GURL /* url */, - GURL /* policy_url */, + GURL /* first_party_for_cookies */, std::string /* cookies */) // Asks the browser to show a modal HTML dialog. The dialog is passed the diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 5128dfd..7bcfa79 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -229,12 +229,12 @@ struct ViewHostMsg_Resource_Request { // The requested URL. GURL url; - // The URL of the document in the top-level window, which may be checked by - // the third-party cookie blocking policy. Leaving it empty may lead to - // undesired cookie blocking. Third-party cookie blocking can be bypassed by - // setting policy_url = url, but this should ideally only be done if there - // really is no way to determine the correct value. - GURL policy_url; + // Usually the URL of the document in the top-level window, which may be + // checked by the third-party cookie blocking policy. Leaving it empty may + // lead to undesired cookie blocking. Third-party cookie blocking can be + // bypassed by setting first_party_for_cookies = url, but this should ideally + // only be done if there really is no way to determine the correct value. + GURL first_party_for_cookies; // The referrer to use (may be empty). GURL referrer; @@ -1178,7 +1178,7 @@ struct ParamTraits<ViewHostMsg_Resource_Request> { static void Write(Message* m, const param_type& p) { WriteParam(m, p.method); WriteParam(m, p.url); - WriteParam(m, p.policy_url); + WriteParam(m, p.first_party_for_cookies); WriteParam(m, p.referrer); WriteParam(m, p.frame_origin); WriteParam(m, p.main_frame_origin); @@ -1194,7 +1194,7 @@ struct ParamTraits<ViewHostMsg_Resource_Request> { return ReadParam(m, iter, &r->method) && ReadParam(m, iter, &r->url) && - ReadParam(m, iter, &r->policy_url) && + ReadParam(m, iter, &r->first_party_for_cookies) && ReadParam(m, iter, &r->referrer) && ReadParam(m, iter, &r->frame_origin) && ReadParam(m, iter, &r->main_frame_origin) && diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index a62b61d..187f59e 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -784,13 +784,13 @@ IPC_BEGIN_MESSAGES(ViewHost) // available to a subsequent ViewHostMsg_GetCookies request. IPC_MESSAGE_CONTROL3(ViewHostMsg_SetCookie, GURL /* url */, - GURL /* policy_url */, + GURL /* first_party_for_cookies */, std::string /* cookie */) // Used to get cookies for the given URL IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_GetCookies, GURL /* url */, - GURL /* policy_url */, + GURL /* first_party_for_cookies */, std::string /* cookies */) // Used to get the list of plugins diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index e879c36..727244f 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -46,7 +46,7 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { IPCResourceLoaderBridge(ResourceDispatcher* dispatcher, const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, @@ -100,7 +100,7 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge( ResourceDispatcher* dispatcher, const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, @@ -118,7 +118,7 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge( DCHECK(dispatcher_) << "no resource dispatcher"; request_.method = method; request_.url = url; - request_.policy_url = policy_url; + request_.first_party_for_cookies = first_party_for_cookies; request_.referrer = referrer; request_.frame_origin = frame_origin; request_.main_frame_origin = main_frame_origin; @@ -534,7 +534,7 @@ void ResourceDispatcher::FlushDeferredMessages(int request_id) { webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge( const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, @@ -545,7 +545,8 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge( uint32 request_context, int app_cache_context_id, int route_id) { - return new webkit_glue::IPCResourceLoaderBridge(this, method, url, policy_url, + return new webkit_glue::IPCResourceLoaderBridge(this, method, url, + first_party_for_cookies, referrer, frame_origin, main_frame_origin, headers, flags, origin_pid, diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h index f4494a5..0996445 100644 --- a/chrome/common/resource_dispatcher.h +++ b/chrome/common/resource_dispatcher.h @@ -37,7 +37,7 @@ class ResourceDispatcher { // implementation. webkit_glue::ResourceLoaderBridge* CreateBridge(const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index d0925a22..e5fddd3 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -215,7 +215,7 @@ bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { ResourceLoaderBridge* ResourceLoaderBridge::Create( const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, @@ -226,7 +226,7 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create( int app_cache_context_id, int routing_id) { ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher(); - return dispatch->CreateBridge(method, url, policy_url, referrer, + return dispatch->CreateBridge(method, url, first_party_for_cookies, referrer, frame_origin, main_frame_origin, headers, load_flags, origin_pid, resource_type, 0, app_cache_context_id, routing_id); diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index 5e7d0bb..408ddef 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -48,19 +48,20 @@ bool RendererWebKitClientImpl::isLinkVisited(unsigned long long link_hash) { return RenderThread::current()->visited_link_slave()->IsVisited(link_hash); } -void RendererWebKitClientImpl::setCookies( - const WebURL& url, const WebURL& policy_url, const WebString& value) { +void RendererWebKitClientImpl::setCookies(const WebURL& url, + const WebURL& first_party_for_cookies, + const WebString& value) { std::string value_utf8; UTF16ToUTF8(value.data(), value.length(), &value_utf8); RenderThread::current()->Send( - new ViewHostMsg_SetCookie(url, policy_url, value_utf8)); + new ViewHostMsg_SetCookie(url, first_party_for_cookies, value_utf8)); } WebString RendererWebKitClientImpl::cookies( - const WebURL& url, const WebURL& policy_url) { + const WebURL& url, const WebURL& first_party_for_cookies) { std::string value_utf8; RenderThread::current()->Send( - new ViewHostMsg_GetCookies(url, policy_url, &value_utf8)); + new ViewHostMsg_GetCookies(url, first_party_for_cookies, &value_utf8)); return WebString::fromUTF8(value_utf8); } diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h index 2e43515..3150b12 100644 --- a/chrome/renderer/renderer_webkitclient_impl.h +++ b/chrome/renderer/renderer_webkitclient_impl.h @@ -22,11 +22,11 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { virtual unsigned long long visitedLinkHash( const char* canonicalURL, size_t length); virtual bool isLinkVisited(unsigned long long linkHash); - virtual void setCookies( - const WebKit::WebURL& url, const WebKit::WebURL& policy_url, - const WebKit::WebString&); + virtual void setCookies(const WebKit::WebURL& url, + const WebKit::WebURL& first_party_for_cookies, + const WebKit::WebString&); virtual WebKit::WebString cookies( - const WebKit::WebURL& url, const WebKit::WebURL& policy_url); + const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies); virtual void prefetchHostName(const WebKit::WebString&); virtual WebKit::WebString defaultLocale(); virtual void suddenTerminationChanged(bool enabled); diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 86424eb..2ae6ec4 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -715,18 +715,18 @@ void WebPluginDelegateProxy::OnGetPluginElement( } void WebPluginDelegateProxy::OnSetCookie(const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const std::string& cookie) { if (plugin_) - plugin_->SetCookie(url, policy_url, cookie); + plugin_->SetCookie(url, first_party_for_cookies, cookie); } void WebPluginDelegateProxy::OnGetCookies(const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, std::string* cookies) { DCHECK(cookies); if (plugin_) - *cookies = plugin_->GetCookies(url, policy_url); + *cookies = plugin_->GetCookies(url, first_party_for_cookies); } void WebPluginDelegateProxy::OnShowModalHTMLDialog( diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h index b554aa9..2ab9e20 100644 --- a/chrome/renderer/webplugin_delegate_proxy.h +++ b/chrome/renderer/webplugin_delegate_proxy.h @@ -121,9 +121,9 @@ class WebPluginDelegateProxy : public WebPluginDelegate, intptr_t* npobject_ptr); void OnGetPluginElement(int route_id, bool* success, intptr_t* npobject_ptr); void OnSetCookie(const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const std::string& cookie); - void OnGetCookies(const GURL& url, const GURL& policy_url, + void OnGetCookies(const GURL& url, const GURL& first_party_for_cookies, std::string* cookies); void OnShowModalHTMLDialog(const GURL& url, int width, int height, const std::string& json_arguments, diff --git a/net/base/cookie_policy.cc b/net/base/cookie_policy.cc index d18db63..0092d8a 100644 --- a/net/base/cookie_policy.cc +++ b/net/base/cookie_policy.cc @@ -10,7 +10,8 @@ namespace net { -bool CookiePolicy::CanGetCookies(const GURL& url, const GURL& policy_url) { +bool CookiePolicy::CanGetCookies(const GURL& url, + const GURL& first_party_for_cookies) { switch (type_) { case CookiePolicy::ALLOW_ALL_COOKIES: return true; @@ -24,15 +25,16 @@ bool CookiePolicy::CanGetCookies(const GURL& url, const GURL& policy_url) { } } -bool CookiePolicy::CanSetCookie(const GURL& url, const GURL& policy_url) { +bool CookiePolicy::CanSetCookie(const GURL& url, + const GURL& first_party_for_cookies) { switch (type_) { case CookiePolicy::ALLOW_ALL_COOKIES: return true; case CookiePolicy::BLOCK_THIRD_PARTY_COOKIES: - if (policy_url.is_empty()) - return true; // Empty policy URL should indicate a first-party request - return net::RegistryControlledDomainService::SameDomainOrHost(url, - policy_url); + if (first_party_for_cookies.is_empty()) + return true; // Empty first-party URL indicates a first-party request. + return net::RegistryControlledDomainService::SameDomainOrHost( + url, first_party_for_cookies); case CookiePolicy::BLOCK_ALL_COOKIES: return false; default: diff --git a/net/base/cookie_policy.h b/net/base/cookie_policy.h index 89d490b..4c01705 100644 --- a/net/base/cookie_policy.h +++ b/net/base/cookie_policy.h @@ -15,17 +15,17 @@ namespace net { class CookiePolicy { public: // Consult the user's third-party cookie blocking preferences to determine - // whether the URL's cookies can be read if the top-level window is policy_url - bool CanGetCookies(const GURL& url, const GURL& policy_url); + // whether the URL's cookies can be read. + bool CanGetCookies(const GURL& url, const GURL& first_party_for_cookies); // Consult the user's third-party cookie blocking preferences to determine - // whether the URL's cookies can be set if the top-level window is policy_url - bool CanSetCookie(const GURL& url, const GURL& policy_url); + // whether the URL's cookies can be set. + bool CanSetCookie(const GURL& url, const GURL& first_party_for_cookies); enum Type { - ALLOW_ALL_COOKIES = 0, // do not perform any cookie blocking - BLOCK_THIRD_PARTY_COOKIES, // prevent third-party cookies from being sent - BLOCK_ALL_COOKIES // disable cookies + ALLOW_ALL_COOKIES = 0, // Do not perform any cookie blocking. + BLOCK_THIRD_PARTY_COOKIES, // Prevent third-party cookies from being set. + BLOCK_ALL_COOKIES // Disable cookies. }; static bool ValidType(int32 type) { diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc index 45043e9..ebfc376 100644 --- a/net/url_request/url_request.cc +++ b/net/url_request/url_request.cc @@ -221,9 +221,10 @@ bool URLRequest::IsHandledURL(const GURL& url) { return IsHandledProtocol(url.scheme()); } -void URLRequest::set_policy_url(const GURL& policy_url) { +void URLRequest::set_first_party_for_cookies( + const GURL& first_party_for_cookies) { DCHECK(!is_pending_); - policy_url_ = policy_url; + first_party_for_cookies_ = first_party_for_cookies; } void URLRequest::set_method(const std::string& method) { diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h index b9863b1..bb4e18a 100644 --- a/net/url_request/url_request.h +++ b/net/url_request/url_request.h @@ -226,8 +226,10 @@ class URLRequest { // The URL that should be consulted for the third-party cookie blocking // policy. - const GURL& policy_url() const { return policy_url_; } - void set_policy_url(const GURL& policy_url); + const GURL& first_party_for_cookies() const { + return first_party_for_cookies_; + } + void set_first_party_for_cookies(const GURL& first_party_for_cookies); // The request method, as an uppercase string. "GET" is the default value. // The request method may only be changed before Start() is called and @@ -505,7 +507,7 @@ class URLRequest { scoped_refptr<net::UploadData> upload_; GURL url_; GURL original_url_; - GURL policy_url_; + GURL first_party_for_cookies_; std::string method_; // "GET", "POST", etc. Should be all uppercase. std::string referrer_; std::string extra_request_headers_; diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc index eff2344..85cb219 100644 --- a/net/url_request/url_request_http_job.cc +++ b/net/url_request/url_request_http_job.cc @@ -502,8 +502,8 @@ void URLRequestHttpJob::NotifyHeadersComplete() { if (!(request_info_.load_flags & net::LOAD_DO_NOT_SAVE_COOKIES)) { URLRequestContext* ctx = request_->context(); if (ctx && ctx->cookie_store() && - ctx->cookie_policy()->CanSetCookie(request_->url(), - request_->policy_url())) { + ctx->cookie_policy()->CanSetCookie( + request_->url(), request_->first_party_for_cookies())) { FetchResponseCookies(); net::CookieMonster::CookieOptions options; options.set_include_httponly(); @@ -654,8 +654,8 @@ std::string URLRequestHttpJob::AssembleRequestCookies() { if (context) { // Add in the cookie header. TODO might we need more than one header? if (context->cookie_store() && - context->cookie_policy()->CanGetCookies(request_->url(), - request_->policy_url())) { + context->cookie_policy()->CanGetCookies( + request_->url(), request_->first_party_for_cookies())) { net::CookieMonster::CookieOptions options; options.set_include_httponly(); std::string cookies = request_->context()->cookie_store()-> diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc index 62771ed..6da1489 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc @@ -96,7 +96,7 @@ bool EnsureIOThread() { struct RequestParams { std::string method; GURL url; - GURL policy_url; + GURL first_party_for_cookies; GURL referrer; std::string headers; int load_flags; @@ -202,7 +202,7 @@ class RequestProxy : public URLRequest::Delegate, void AsyncStart(RequestParams* params) { request_.reset(new URLRequest(params->url, this)); request_->set_method(params->method); - request_->set_policy_url(params->policy_url); + request_->set_first_party_for_cookies(params->first_party_for_cookies); request_->set_referrer(params->referrer.spec()); request_->SetExtraRequestHeaders(params->headers); request_->set_load_flags(params->load_flags); @@ -427,7 +427,7 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { public: ResourceLoaderBridgeImpl(const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& headers, int load_flags, @@ -436,7 +436,7 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge { proxy_(NULL) { params_->method = method; params_->url = url; - params_->policy_url = policy_url; + params_->first_party_for_cookies = first_party_for_cookies; params_->referrer = referrer; params_->headers = headers; params_->load_flags = load_flags; @@ -566,7 +566,7 @@ namespace webkit_glue { ResourceLoaderBridge* ResourceLoaderBridge::Create( const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, @@ -576,7 +576,7 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create( ResourceType::Type request_type, int app_cache_context_id, int routing_id) { - return new ResourceLoaderBridgeImpl(method, url, policy_url, + return new ResourceLoaderBridgeImpl(method, url, first_party_for_cookies, referrer, headers, load_flags, app_cache_context_id); } @@ -627,8 +627,9 @@ void SimpleResourceLoaderBridge::Shutdown() { } } -void SimpleResourceLoaderBridge::SetCookie( - const GURL& url, const GURL& policy_url, const std::string& cookie) { +void SimpleResourceLoaderBridge::SetCookie(const GURL& url, + const GURL& first_party_for_cookies, + const std::string& cookie) { // Proxy to IO thread to synchronize w/ network loading. if (!EnsureIOThread()) { @@ -642,7 +643,7 @@ void SimpleResourceLoaderBridge::SetCookie( } std::string SimpleResourceLoaderBridge::GetCookies( - const GURL& url, const GURL& policy_url) { + const GURL& url, const GURL& first_party_for_cookies) { // Proxy to IO thread to synchronize w/ network loading if (!EnsureIOThread()) { diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.h b/webkit/tools/test_shell/simple_resource_loader_bridge.h index 47ff223..24df90c 100644 --- a/webkit/tools/test_shell/simple_resource_loader_bridge.h +++ b/webkit/tools/test_shell/simple_resource_loader_bridge.h @@ -28,10 +28,11 @@ class SimpleResourceLoaderBridge { static void Shutdown(); // May only be called after Init. - static void SetCookie( - const GURL& url, const GURL& policy_url, const std::string& cookie); - static std::string GetCookies( - const GURL& url, const GURL& policy_url); + static void SetCookie(const GURL& url, + const GURL& first_party_for_cookies, + const std::string& cookie); + static std::string GetCookies(const GURL& url, + const GURL& first_party_for_cookies); }; #endif // WEBKIT_TOOLS_TEST_SHELL_SIMPLE_RESOURCE_LOADER_BRIDGE_H__ diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h index fe00c3d..ae6a9f1 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.h +++ b/webkit/tools/test_shell/test_shell_webkit_init.h @@ -71,15 +71,18 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl { return false; } - virtual void setCookies( - const WebKit::WebURL& url, const WebKit::WebURL& policy_url, - const WebKit::WebString& value) { - SimpleResourceLoaderBridge::SetCookie(url, policy_url, UTF16ToUTF8(value)); + virtual void setCookies(const WebKit::WebURL& url, + const WebKit::WebURL& first_party_for_cookies, + const WebKit::WebString& value) { + SimpleResourceLoaderBridge::SetCookie( + url, first_party_for_cookies, UTF16ToUTF8(value)); } virtual WebKit::WebString cookies( - const WebKit::WebURL& url, const WebKit::WebURL& policy_url) { - return UTF8ToUTF16(SimpleResourceLoaderBridge::GetCookies(url, policy_url)); + const WebKit::WebURL& url, + const WebKit::WebURL& first_party_for_cookies) { + return UTF8ToUTF16(SimpleResourceLoaderBridge::GetCookies( + url, first_party_for_cookies)); } virtual void prefetchHostName(const WebKit::WebString&) { diff --git a/webkit/tools/test_shell/test_worker/test_worker_main.cc b/webkit/tools/test_shell/test_worker/test_worker_main.cc index 50185b9..366b217 100644 --- a/webkit/tools/test_shell/test_worker/test_worker_main.cc +++ b/webkit/tools/test_shell/test_worker/test_worker_main.cc @@ -60,13 +60,14 @@ class WorkerWebKitClientImpl : public webkit_glue::WebKitClientImpl { } virtual void setCookies(const WebKit::WebURL& url, - const WebKit::WebURL& policy_url, + const WebKit::WebURL& first_party_for_cookies, const WebKit::WebString& value) { NOTREACHED(); } - virtual WebKit::WebString cookies(const WebKit::WebURL& url, - const WebKit::WebURL& policy_url) { + virtual WebKit::WebString cookies( + const WebKit::WebURL& url, + const WebKit::WebURL& first_party_for_cookies) { NOTREACHED(); return WebKit::WebString(); } @@ -122,7 +123,7 @@ __attribute__((visibility("default"))) ResourceLoaderBridge* ResourceLoaderBridge::Create( const std::string& method, const GURL& url, - const GURL& policy_url, + const GURL& first_party_for_cookies, const GURL& referrer, const std::string& frame_origin, const std::string& main_frame_origin, |