diff options
Diffstat (limited to 'net/websockets')
-rw-r--r-- | net/websockets/websocket_job.cc | 7 | ||||
-rw-r--r-- | net/websockets/websocket_job.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc index 95060c6..10b351a 100644 --- a/net/websockets/websocket_job.cc +++ b/net/websockets/websocket_job.cc @@ -53,11 +53,18 @@ static base::LazyInstance<WebSocketJobInitSingleton> g_websocket_job_init( namespace net { +bool WebSocketJob::websocket_over_spdy_enabled_ = false; + // static void WebSocketJob::EnsureInit() { g_websocket_job_init.Get(); } +// static +void WebSocketJob::set_websocket_over_spdy_enabled(bool enabled) { + websocket_over_spdy_enabled_ = enabled; +} + WebSocketJob::WebSocketJob(SocketStream::Delegate* delegate) : delegate_(delegate), state_(INITIALIZED), diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h index f1dcdc8..1584fd6 100644 --- a/net/websockets/websocket_job.h +++ b/net/websockets/websocket_job.h @@ -46,6 +46,10 @@ class NET_API WebSocketJob static void EnsureInit(); + // Enable or Disable WebSocket over SPDY feature. + // This function is intended to be called before I/O thread starts. + static void set_websocket_over_spdy_enabled(bool enabled); + State state() const { return state_; } virtual void Connect(); virtual bool SendData(const char* data, int len); @@ -94,6 +98,8 @@ class NET_API WebSocketJob void SendPending(); + static bool websocket_over_spdy_enabled_; + SocketStream::Delegate* delegate_; State state_; bool waiting_; |