Index: net/server/web_socket.h |
diff --git a/net/server/web_socket.h b/net/server/web_socket.h |
index 49ced84ee6de03980ed90ad855d30db73f2b15ad..9b3a794452af27537752c08bffad4a3431d4fcae 100644 |
--- a/net/server/web_socket.h |
+++ b/net/server/web_socket.h |
@@ -8,10 +8,12 @@ |
#include <string> |
#include "base/basictypes.h" |
+#include "base/strings/string_piece.h" |
namespace net { |
class HttpConnection; |
+class HttpServer; |
class HttpServerRequestInfo; |
class WebSocket { |
@@ -23,11 +25,12 @@ class WebSocket { |
FRAME_ERROR |
}; |
- static WebSocket* CreateWebSocket(HttpConnection* connection, |
+ static WebSocket* CreateWebSocket(HttpServer* server, |
+ HttpConnection* connection, |
const HttpServerRequestInfo& request, |
size_t* pos); |
- static ParseResult DecodeFrameHybi17(const std::string& frame, |
+ static ParseResult DecodeFrameHybi17(const base::StringPiece& frame, |
bool client_frame, |
int* bytes_consumed, |
std::string* output); |
@@ -41,8 +44,10 @@ class WebSocket { |
virtual ~WebSocket() {} |
protected: |
- explicit WebSocket(HttpConnection* connection); |
- HttpConnection* connection_; |
+ WebSocket(HttpServer* server, HttpConnection* connection); |
+ |
+ HttpServer* const server_; |
+ HttpConnection* const connection_; |
private: |
DISALLOW_COPY_AND_ASSIGN(WebSocket); |