summaryrefslogtreecommitdiffstats
path: root/net/websockets/websocket_stream.h
diff options
context:
space:
mode:
authorricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 13:47:01 +0000
committerricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-23 13:47:01 +0000
commit693ebf370811fabc6d9dc7ca1682a182998adce3 (patch)
tree8d57531048236bb194fc12e9a1a3ffd80d71cd43 /net/websockets/websocket_stream.h
parenta6358f2b505bb5f1f0e58f6ced9080b98cd15240 (diff)
downloadchromium_src-693ebf370811fabc6d9dc7ca1682a182998adce3.zip
chromium_src-693ebf370811fabc6d9dc7ca1682a182998adce3.tar.gz
chromium_src-693ebf370811fabc6d9dc7ca1682a182998adce3.tar.bz2
Changes to class hierachy to prepare for WebSocketBasicHandshakeStream.
See https://codereview.chromium.org/25417005/ for the in-progress development of WebSocketBasicHandshakeStream. See design doc at https://docs.google.com/a/google.com/document/d/1AH2lRR2i2Wf4yODgckgdsvZeuGwpbvsvMGLnAMUXUbM/edit for the reasoning behind the changes. This CL does not include the renaming of WebSocketStreamBase to WebSocketHandshakeStreamBase. This decision is a bit arbitrary. BUG=303568 TEST=net_unittests Review URL: https://codereview.chromium.org/26872005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets/websocket_stream.h')
-rw-r--r--net/websockets/websocket_stream.h39
1 files changed, 1 insertions, 38 deletions
diff --git a/net/websockets/websocket_stream.h b/net/websockets/websocket_stream.h
index ca29f57..ce9551d 100644
--- a/net/websockets/websocket_stream.h
+++ b/net/websockets/websocket_stream.h
@@ -14,15 +14,12 @@
#include "base/memory/scoped_vector.h"
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
-#include "net/websockets/websocket_stream_base.h"
class GURL;
namespace net {
class BoundNetLog;
-class HttpRequestHeaders;
-class HttpResponseInfo;
class URLRequestContext;
struct WebSocketFrame;
@@ -49,7 +46,7 @@ class NET_EXPORT_PRIVATE WebSocketStreamRequest {
// |callback| will be called when the operation is finished. Non-null |callback|
// must be provided to these functions.
-class NET_EXPORT_PRIVATE WebSocketStream : public WebSocketStreamBase {
+class NET_EXPORT_PRIVATE WebSocketStream {
public:
// A concrete object derived from ConnectDelegate is supplied by the caller to
// CreateAndConnectStream() to receive the result of the connection.
@@ -156,40 +153,6 @@ class NET_EXPORT_PRIVATE WebSocketStream : public WebSocketStreamBase {
// extensions were negotiated, the empty string is returned.
virtual std::string GetExtensions() const = 0;
- // TODO(yutak): Add following interfaces:
- // - RenewStreamForAuth for authentication (is this necessary?)
- // - GetSSLInfo, GetSSLCertRequestInfo for SSL
-
- // WebSocketStreamBase derived functions
- virtual WebSocketStream* AsWebSocketStream() OVERRIDE;
-
- ////////////////////////////////////////////////////////////////////////////
- // Methods used during the stream handshake. These must not be called once a
- // WebSocket protocol stream has been established (ie. after the
- // SuccessCallback or FailureCallback has been called.)
-
- // Writes WebSocket handshake request to the underlying socket. Must be called
- // before ReadHandshakeResponse().
- //
- // |callback| will only be called if this method returns ERR_IO_PENDING.
- //
- // |response_info| must remain valid until the callback from
- // ReadHandshakeResponse has been called.
- //
- // TODO(ricea): This function is only used during the handshake and is
- // probably only applicable to certain subclasses of WebSocketStream. Move it
- // somewhere else? Also applies to ReadHandshakeResponse.
- virtual int SendHandshakeRequest(const GURL& url,
- const HttpRequestHeaders& headers,
- HttpResponseInfo* response_info,
- const CompletionCallback& callback) = 0;
-
- // Reads WebSocket handshake response from the underlying socket. Must be
- // called after SendHandshakeRequest() completes.
- //
- // |callback| will only be called if this method returns ERR_IO_PENDING.
- virtual int ReadHandshakeResponse(const CompletionCallback& callback) = 0;
-
protected:
WebSocketStream();