diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 21:51:25 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 21:51:25 +0000 |
commit | ffeb088e92325536ac1c371df3c4bd857ccb1221 (patch) | |
tree | af34055a796ac8181e3d90b838a02fcaf960ce26 /net/base/ssl_client_socket_mac.h | |
parent | b57d5cc9dd98fc4fb284878ecc73e2eb95f6d1bd (diff) | |
download | chromium_src-ffeb088e92325536ac1c371df3c4bd857ccb1221.zip chromium_src-ffeb088e92325536ac1c371df3c4bd857ccb1221.tar.gz chromium_src-ffeb088e92325536ac1c371df3c4bd857ccb1221.tar.bz2 |
Extend the use of IOBuffers to the code underneath
HttpNetworkTransaction (to the Socket class).
This is the first step to remove the blocking call on the
destructor of the network transaction, from IO thread.
BUG=9258
R=wtc
Review URL: http://codereview.chromium.org/87073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/ssl_client_socket_mac.h')
-rw-r--r-- | net/base/ssl_client_socket_mac.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/base/ssl_client_socket_mac.h b/net/base/ssl_client_socket_mac.h index 3396c2d..9d4dec0 100644 --- a/net/base/ssl_client_socket_mac.h +++ b/net/base/ssl_client_socket_mac.h @@ -39,8 +39,8 @@ class SSLClientSocketMac : public SSLClientSocket { virtual bool IsConnectedAndIdle() const; // Socket methods: - virtual int Read(char* buf, int buf_len, CompletionCallback* callback); - virtual int Write(const char* buf, int buf_len, CompletionCallback* callback); + virtual int Read(IOBuffer* buf, int buf_len, CompletionCallback* callback); + virtual int Write(IOBuffer* buf, int buf_len, CompletionCallback* callback); private: void DoCallback(int result); @@ -70,7 +70,7 @@ class SSLClientSocketMac : public SSLClientSocket { CompletionCallback* user_callback_; // Used by both Read and Write functions. - char* user_buf_; + scoped_refptr<IOBuffer> user_buf_; int user_buf_len_; enum State { @@ -96,6 +96,10 @@ class SSLClientSocketMac : public SSLClientSocket { std::vector<char> recv_buffer_; int recv_buffer_head_slop_; int recv_buffer_tail_slop_; + + // This buffer holds data for Read() operations on the underlying transport + // (ClientSocket::Read()). + scoped_refptr<IOBuffer> read_io_buf_; }; } // namespace net |