summaryrefslogtreecommitdiffstats
path: root/net/websockets
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 10:16:33 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-17 10:16:33 +0000
commitba3443695a61a148ed76c8701f0def16919f904c (patch)
tree1f48590dc5d970963558d1e6f9435d39242e2044 /net/websockets
parent9dc5e0f60d009bd665aaac4f0ccbc02af6fffa25 (diff)
downloadchromium_src-ba3443695a61a148ed76c8701f0def16919f904c.zip
chromium_src-ba3443695a61a148ed76c8701f0def16919f904c.tar.gz
chromium_src-ba3443695a61a148ed76c8701f0def16919f904c.tar.bz2
Revert 194560 "[SPDY] Replace SpdyIOBuffer with new SpdyBuffer c..."
> [SPDY] Replace SpdyIOBuffer with new SpdyBuffer class > > Use SpdyBuffer for both SPDY reads and writes. A future > CL will add hooks to SpdyBuffer so that we keep track of > flow control windows properly. > > Replace SpdyFrameProducer with SpdyBufferProducer. > > Also introduce new SpdyReadQueue class for delegates > of SpdyStream to use. > > BUG=176592 > > Review URL: https://codereview.chromium.org/13990005 TBR=akalin@chromium.org Review URL: https://codereview.chromium.org/13996009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets')
-rw-r--r--net/websockets/websocket_job.cc11
-rw-r--r--net/websockets/websocket_job.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/net/websockets/websocket_job.cc b/net/websockets/websocket_job.cc
index 53e0eda..3aeb8aa 100644
--- a/net/websockets/websocket_job.cc
+++ b/net/websockets/websocket_job.cc
@@ -9,10 +9,10 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "googleurl/src/gurl.h"
-#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/cookies/cookie_store.h"
+#include "net/base/io_buffer.h"
#include "net/http/http_network_session.h"
#include "net/http/http_transaction_factory.h"
#include "net/http/http_util.h"
@@ -330,19 +330,14 @@ void WebSocketJob::OnSentSpdyData(size_t bytes_sent) {
OnSentData(socket_, static_cast<int>(bytes_sent));
}
-void WebSocketJob::OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) {
+void WebSocketJob::OnReceivedSpdyData(const char* data, int length) {
DCHECK_NE(INITIALIZED, state_);
DCHECK_NE(CONNECTING, state_);
if (state_ == CLOSED)
return;
if (!spdy_websocket_stream_.get())
return;
- if (buffer) {
- OnReceivedData(socket_, buffer->GetRemainingData(),
- buffer->GetRemainingSize());
- } else {
- OnReceivedData(socket_, NULL, 0);
- }
+ OnReceivedData(socket_, data, length);
}
void WebSocketJob::OnCloseSpdyStream() {
diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h
index 02e4dfd..29f327c 100644
--- a/net/websockets/websocket_job.h
+++ b/net/websockets/websocket_job.h
@@ -83,7 +83,7 @@ class NET_EXPORT WebSocketJob
virtual int OnReceivedSpdyResponseHeader(
const SpdyHeaderBlock& headers, int status) OVERRIDE;
virtual void OnSentSpdyData(size_t bytes_sent) OVERRIDE;
- virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) OVERRIDE;
+ virtual void OnReceivedSpdyData(const char* data, int length) OVERRIDE;
virtual void OnCloseSpdyStream() OVERRIDE;
private: