diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 13:17:59 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-26 13:17:59 +0000 |
commit | c9a5a942df52a268e4b1f5ad53e46464e3d4513a (patch) | |
tree | 210e124346a524e897220cfe23105bb85d6d6ed6 /net/websockets | |
parent | 966ba9b5f074d4f91ed54969117f1fb99616a3eb (diff) | |
download | chromium_src-c9a5a942df52a268e4b1f5ad53e46464e3d4513a.zip chromium_src-c9a5a942df52a268e4b1f5ad53e46464e3d4513a.tar.gz chromium_src-c9a5a942df52a268e4b1f5ad53e46464e3d4513a.tar.bz2 |
Add a websocket-over-spdy flag. This change is a part of WebSocket over SPDY
support in progress.
BUG=42320
TEST=N/A
Review URL: http://codereview.chromium.org/7047003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86812 0039d316-1c4b-4281-b951-d872f2087c98
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_; |