| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ | 5 #ifndef NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ |
| 6 #define NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ | 6 #define NET_SOCKET_BUFFERED_WRITE_STREAM_SOCKET_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class NET_EXPORT_PRIVATE BufferedWriteStreamSocket : public StreamSocket { | 36 class NET_EXPORT_PRIVATE BufferedWriteStreamSocket : public StreamSocket { |
| 37 public: | 37 public: |
| 38 explicit BufferedWriteStreamSocket(scoped_ptr<StreamSocket> socket_to_wrap); | 38 explicit BufferedWriteStreamSocket(scoped_ptr<StreamSocket> socket_to_wrap); |
| 39 virtual ~BufferedWriteStreamSocket(); | 39 virtual ~BufferedWriteStreamSocket(); |
| 40 | 40 |
| 41 // Socket interface | 41 // Socket interface |
| 42 virtual int Read(IOBuffer* buf, int buf_len, | 42 virtual int Read(IOBuffer* buf, int buf_len, |
| 43 const CompletionCallback& callback) OVERRIDE; | 43 const CompletionCallback& callback) OVERRIDE; |
| 44 virtual int Write(IOBuffer* buf, int buf_len, | 44 virtual int Write(IOBuffer* buf, int buf_len, |
| 45 const CompletionCallback& callback) OVERRIDE; | 45 const CompletionCallback& callback) OVERRIDE; |
| 46 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 46 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; |
| 47 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 47 virtual int SetSendBufferSize(int32 size) OVERRIDE; |
| 48 | 48 |
| 49 // StreamSocket interface | 49 // StreamSocket interface |
| 50 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 50 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
| 51 virtual void Disconnect() OVERRIDE; | 51 virtual void Disconnect() OVERRIDE; |
| 52 virtual bool IsConnected() const OVERRIDE; | 52 virtual bool IsConnected() const OVERRIDE; |
| 53 virtual bool IsConnectedAndIdle() const OVERRIDE; | 53 virtual bool IsConnectedAndIdle() const OVERRIDE; |
| 54 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 54 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
| 55 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 55 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
| 56 virtual const BoundNetLog& NetLog() const OVERRIDE; | 56 virtual const BoundNetLog& NetLog() const OVERRIDE; |
| 57 virtual void SetSubresourceSpeculation() OVERRIDE; | 57 virtual void SetSubresourceSpeculation() OVERRIDE; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 74 int error_; | 74 int error_; |
| 75 | 75 |
| 76 base::WeakPtrFactory<BufferedWriteStreamSocket> weak_factory_; | 76 base::WeakPtrFactory<BufferedWriteStreamSocket> weak_factory_; |
| 77 | 77 |
| 78 DISALLOW_COPY_AND_ASSIGN(BufferedWriteStreamSocket); | 78 DISALLOW_COPY_AND_ASSIGN(BufferedWriteStreamSocket); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 } // namespace net | 81 } // namespace net |
| 82 | 82 |
| 83 #endif // NET_SOCKET_STREAM_SOCKET_H_ | 83 #endif // NET_SOCKET_STREAM_SOCKET_H_ |
| OLD | NEW |