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

Unified Diff: net/websockets/websocket_handshake_handler.h

Issue 2743003: Add Spdy support in WebSocketHandshake*Handler (Closed)
Patch Set: fix Created 10 years, 6 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_handler.h
diff --git a/net/websockets/websocket_handshake_handler.h b/net/websockets/websocket_handshake_handler.h
index d661f94d17706112707a644cf1febfaba1dc0e30..3c11e00abe688449e8dcbb1eb3bf30a885a6dadd 100644
--- a/net/websockets/websocket_handshake_handler.h
+++ b/net/websockets/websocket_handshake_handler.h
@@ -19,6 +19,7 @@
#include "base/ref_counted.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_info.h"
+#include "net/spdy/spdy_framer.h"
namespace net {
@@ -43,8 +44,13 @@ class WebSocketHandshakeRequestHandler {
size_t headers_to_remove_len);
// Gets request info to open WebSocket connection.
- // Also, full challange data in |challenge|.
+ // Also, fill challange data in |challenge|.
HttpRequestInfo GetRequestInfo(const GURL& url, std::string* challenge);
+ // Gets request as SpdyHeaderBlock.
+ // Also, fill challenge data in |challenge|.
+ bool GetRequestHeaderBlock(const GURL& url,
+ spdy::SpdyHeaderBlock* headers,
+ std::string* challenge);
// Gets WebSocket handshake raw request message to open WebSocket
// connection.
std::string GetRawRequest();
@@ -79,6 +85,9 @@ class WebSocketHandshakeResponseHandler {
// Parses WebSocket handshake response info given as HttpResponseInfo.
bool ParseResponseInfo(const HttpResponseInfo& response_info,
const std::string& challenge);
+ // Parses WebSocket handshake response as SpdyHeaderBlock.
+ bool ParseResponseHeaderBlock(const spdy::SpdyHeaderBlock& headers,
+ const std::string& challenge);
// Gets the headers value.
void GetHeaders(const char* const headers_to_get[],
« no previous file with comments | « no previous file | net/websockets/websocket_handshake_handler.cc » ('j') | net/websockets/websocket_handshake_handler_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698