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

Unified Diff: net/server/web_socket.h

Issue 296053012: Replace StreamListenSocket with StreamSocket in HttpServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 6 years, 4 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/server/web_socket.h
diff --git a/net/server/web_socket.h b/net/server/web_socket.h
index 49ced84ee6de03980ed90ad855d30db73f2b15ad..5e7b35b3ec78cdeef76677e13e9c579e182e3337 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_;
+ explicit WebSocket(HttpServer* server, HttpConnection* connection);
mmenke 2014/08/14 16:36:03 nit: Explicit no longer needed.
byungchul 2014/08/14 18:44:03 Done.
+
+ HttpServer* const server_;
+ HttpConnection* const connection_;
private:
DISALLOW_COPY_AND_ASSIGN(WebSocket);

Powered by Google App Engine
This is Rietveld 408576698