diff options
author | ricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 09:04:21 +0000 |
---|---|---|
committer | ricea@chromium.org <ricea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 09:04:21 +0000 |
commit | 7e841a5e0d4e86ac0c11788dc3a5771d8f8f64ae (patch) | |
tree | 6dadd204e62b6e188f008820b2574b076e54094d /net/websockets/websocket_handshake_stream_base.h | |
parent | 4b02bbca3c52f2556078aa3dcb48fdc8a34136be (diff) | |
download | chromium_src-7e841a5e0d4e86ac0c11788dc3a5771d8f8f64ae.zip chromium_src-7e841a5e0d4e86ac0c11788dc3a5771d8f8f64ae.tar.gz chromium_src-7e841a5e0d4e86ac0c11788dc3a5771d8f8f64ae.tar.bz2 |
Change CreateBasicStream to take a scoped_ptr
Previously,
WebSocketHandshakeStreamBase::CreateHelper::CreateBasicStream() took a
ClientSocketHandle argument by raw pointer. Since this method takes
ownership of this pointer, this was error-prone.
Changed to take a scoped_ptr<> argument.
BUG=322362
Review URL: https://codereview.chromium.org/82553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets/websocket_handshake_stream_base.h')
-rw-r--r-- | net/websockets/websocket_handshake_stream_base.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/websockets/websocket_handshake_stream_base.h b/net/websockets/websocket_handshake_stream_base.h index 96551d0..60e55bd 100644 --- a/net/websockets/websocket_handshake_stream_base.h +++ b/net/websockets/websocket_handshake_stream_base.h @@ -10,6 +10,7 @@ // this file must not introduce any link-time dependencies on websockets. #include "base/basictypes.h" +#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "net/http/http_stream_base.h" #include "net/websockets/websocket_stream.h" @@ -29,12 +30,11 @@ class NET_EXPORT WebSocketHandshakeStreamBase : public HttpStreamBase { public: virtual ~CreateHelper() {} - // Create a WebSocketBasicHandshakeStream. This function (or the returned - // object) takes the ownership of |connection|. This is called after the + // Create a WebSocketBasicHandshakeStream. This is called after the // underlying connection has been established but before any handshake data // has been transferred. virtual WebSocketHandshakeStreamBase* CreateBasicStream( - ClientSocketHandle* connection, + scoped_ptr<ClientSocketHandle> connection, bool using_proxy) = 0; // Create a WebSocketSpdyHandshakeStream (unimplemented as of October 2013) |