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

Unified Diff: net/websockets/websocket_handshake_stream_create_helper.cc

Issue 143913003: Add construction of WebSocketDeflateStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase and add DCHECK() for extension params. Created 6 years, 11 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
Index: net/websockets/websocket_handshake_stream_create_helper.cc
diff --git a/net/websockets/websocket_handshake_stream_create_helper.cc b/net/websockets/websocket_handshake_stream_create_helper.cc
index 8268cda15fbc8493f41c00bfb004f9955408873f..b3ff3e2d92a75696513adc17c89edf2548f5ba42 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper.cc
@@ -26,12 +26,17 @@ WebSocketHandshakeStreamBase*
WebSocketHandshakeStreamCreateHelper::CreateBasicStream(
scoped_ptr<ClientSocketHandle> connection,
bool using_proxy) {
+ // The list of supported extensions and parameters is hard-coded.
+ // TODO(ricea): If more extensions are added, consider a more flexible
+ // method.
+ std::vector<std::string> extensions(
+ 1, "permessage-deflate; client_max_window_bits");
return stream_ =
new WebSocketBasicHandshakeStream(connection.Pass(),
connect_delegate_,
using_proxy,
requested_subprotocols_,
- std::vector<std::string>());
+ extensions);
}
// TODO(ricea): Create a WebSocketSpdyHandshakeStream. crbug.com/323852
« no previous file with comments | « net/websockets/websocket_basic_handshake_stream.cc ('k') | net/websockets/websocket_handshake_stream_create_helper_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698