summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 17:48:07 +0000
committerdilmah@chromium.org <dilmah@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 17:48:07 +0000
commit5ddffb822144de64aa36bd1aa4fc0aad634a3454 (patch)
tree1319b6250421e165159e82288df605ae7d245b5c /net
parent3b99e2ef219b43cdc51a3313268e6c9a27aa1be9 (diff)
downloadchromium_src-5ddffb822144de64aa36bd1aa4fc0aad634a3454.zip
chromium_src-5ddffb822144de64aa36bd1aa4fc0aad634a3454.tar.gz
chromium_src-5ddffb822144de64aa36bd1aa4fc0aad634a3454.tar.bz2
Support SSL connections in websocket-to-TCP proxy.
For historical reasons current implementation of WS-to-TCP proxy was implemented as standalone libevent-based server. Then it was integrated into chromium as is. In order to support SSL we need to connect libevent-based proxy with MessageLoopForIO-based chromium network stack. We do it using pipes. It is intended as temporary solution until we will have new shiny implementation of WS-to-TCP proxy integrated into network stack. BUG=chromium-os:15533 TEST=Manual Review URL: http://codereview.chromium.org/8087001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/io_buffer.cc5
-rw-r--r--net/base/io_buffer.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc
index aa04870..b1c72ce 100644
--- a/net/base/io_buffer.cc
+++ b/net/base/io_buffer.cc
@@ -31,6 +31,11 @@ IOBufferWithSize::IOBufferWithSize(int size)
size_(size) {
}
+IOBufferWithSize::IOBufferWithSize(char* data, int size)
+ : IOBuffer(data),
+ size_(size) {
+}
+
IOBufferWithSize::~IOBufferWithSize() {
}
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index 1451dec..79fedfe 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -46,7 +46,11 @@ class NET_EXPORT IOBufferWithSize : public IOBuffer {
int size() const { return size_; }
- private:
+ protected:
+ // Purpose of this constructor is to give a subclass access to the base class
+ // constructor IOBuffer(char*) thus allowing subclass to use underlying
+ // memory it does not own.
+ IOBufferWithSize(char* data, int size);
virtual ~IOBufferWithSize();
int size_;