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

Unified Diff: net/websockets/websocket.h

Issue 1108002: Implement new websocket handshake based on draft-hixie-thewebsocketprotocol-76 (Closed)
Patch Set: fix for review comments Created 10 years, 9 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/net.gyp ('k') | net/websockets/websocket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket.h
diff --git a/net/websockets/websocket.h b/net/websockets/websocket.h
index 5e58391972ed6174207522275ae804574193fcc4..427af5691913dbd4fba8face34d4e2e481997527 100644
--- a/net/websockets/websocket.h
+++ b/net/websockets/websocket.h
@@ -60,15 +60,21 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>,
OPEN = 1,
CLOSED = 2,
};
+ enum ProtocolVersion {
+ DEFAULT_VERSION = 0,
+ DRAFT75 = 1,
+ };
class Request {
public:
Request(const GURL& url, const std::string protocol,
const std::string origin, const std::string location,
+ ProtocolVersion version,
URLRequestContext* context)
: url_(url),
protocol_(protocol),
origin_(origin),
location_(location),
+ version_(version),
context_(context),
host_resolver_(NULL),
client_socket_factory_(NULL) {}
@@ -78,6 +84,7 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>,
const std::string& protocol() const { return protocol_; }
const std::string& origin() const { return origin_; }
const std::string& location() const { return location_; }
+ ProtocolVersion version() const { return version_; }
URLRequestContext* context() const { return context_; }
// Sets an alternative HostResolver. For testing purposes only.
@@ -100,6 +107,7 @@ class WebSocket : public base::RefCountedThreadSafe<WebSocket>,
std::string protocol_;
std::string origin_;
std::string location_;
+ ProtocolVersion version_;
scoped_refptr<URLRequestContext> context_;
scoped_refptr<HostResolver> host_resolver_;
« no previous file with comments | « net/net.gyp ('k') | net/websockets/websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698