Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2000)

Unified Diff: content/child/websocket_bridge.cc

Issue 2102993002: Fix WebSocket to set first party for cookies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update testRunner calls to setBlockThirdPartyCookies() Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/common/websocket_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/websocket_bridge.cc
diff --git a/content/child/websocket_bridge.cc b/content/child/websocket_bridge.cc
index d603fc5a8bb0feb83bb70637f492450bc1fce15f..bd94b425874c2a0eefa97a27f0b088b138ff3317 100644
--- a/content/child/websocket_bridge.cc
+++ b/content/child/websocket_bridge.cc
@@ -206,6 +206,7 @@ void WebSocketBridge::DidStartClosingHandshake() {
void WebSocketBridge::connect(const WebURL& url,
const WebVector<WebString>& protocols,
const WebSecurityOrigin& origin,
+ const WebURL& first_party_for_cookies,
const WebString& user_agent_override,
WebSocketHandleClient* client) {
DCHECK_EQ(kInvalidChannelId, channel_id_);
@@ -222,10 +223,17 @@ void WebSocketBridge::connect(const WebURL& url,
<< base::JoinString(protocols_to_pass, ", ") << "), "
<< origin.toString().utf8() << ")";
+ WebSocketHostMsg_AddChannelRequest_Params params;
+ params.socket_url = url;
+ params.requested_protocols = protocols_to_pass;
+ params.origin = origin;
+ params.first_party_for_cookies = first_party_for_cookies;
+ params.user_agent_override = user_agent_override.latin1();
+ params.render_frame_id = render_frame_id_;
+
// Headers (ie: User-Agent) are ISO Latin 1.
ChildThreadImpl::current()->Send(new WebSocketHostMsg_AddChannelRequest(
- channel_id_, url, protocols_to_pass, origin,
- user_agent_override.latin1(), render_frame_id_));
+ channel_id_, params));
}
void WebSocketBridge::send(bool fin,
« no previous file with comments | « content/child/websocket_bridge.h ('k') | content/common/websocket_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698