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

Unified Diff: net/websockets/websocket_channel.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 | « net/websockets/websocket_channel.h ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_channel.cc
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc
index ba100ecea2a6e9e581322896132424008442e060..a12d4f948f40c950659468c0a6b5259558120041 100644
--- a/net/websockets/websocket_channel.cc
+++ b/net/websockets/websocket_channel.cc
@@ -338,11 +338,12 @@ void WebSocketChannel::SendAddChannelRequest(
const GURL& socket_url,
const std::vector<std::string>& requested_subprotocols,
const url::Origin& origin,
+ const GURL& first_party_for_cookies,
const std::string& additional_headers) {
// Delegate to the tested version.
SendAddChannelRequestWithSuppliedCreator(
- socket_url, requested_subprotocols, origin, additional_headers,
- base::Bind(&WebSocketStream::CreateAndConnectStream));
+ socket_url, requested_subprotocols, origin, first_party_for_cookies,
+ additional_headers, base::Bind(&WebSocketStream::CreateAndConnectStream));
}
void WebSocketChannel::SetState(State new_state) {
@@ -544,10 +545,12 @@ void WebSocketChannel::SendAddChannelRequestForTesting(
const GURL& socket_url,
const std::vector<std::string>& requested_subprotocols,
const url::Origin& origin,
+ const GURL& first_party_for_cookies,
const std::string& additional_headers,
const WebSocketStreamCreator& creator) {
SendAddChannelRequestWithSuppliedCreator(socket_url, requested_subprotocols,
- origin, additional_headers, creator);
+ origin, first_party_for_cookies,
+ additional_headers, creator);
}
void WebSocketChannel::SetClosingHandshakeTimeoutForTesting(
@@ -564,6 +567,7 @@ void WebSocketChannel::SendAddChannelRequestWithSuppliedCreator(
const GURL& socket_url,
const std::vector<std::string>& requested_subprotocols,
const url::Origin& origin,
+ const GURL& first_party_for_cookies,
const std::string& additional_headers,
const WebSocketStreamCreator& creator) {
DCHECK_EQ(FRESHLY_CONSTRUCTED, state_);
@@ -578,8 +582,9 @@ void WebSocketChannel::SendAddChannelRequestWithSuppliedCreator(
std::unique_ptr<WebSocketStream::ConnectDelegate> connect_delegate(
new ConnectDelegate(this));
stream_request_ = creator.Run(socket_url_, requested_subprotocols, origin,
- additional_headers, url_request_context_,
- BoundNetLog(), std::move(connect_delegate));
+ first_party_for_cookies, additional_headers,
+ url_request_context_, BoundNetLog(),
+ std::move(connect_delegate));
SetState(CONNECTING);
}
« no previous file with comments | « net/websockets/websocket_channel.h ('k') | net/websockets/websocket_channel_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698