Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(920)

Unified Diff: net/spdy/spdy_websocket_stream_spdy3_unittest.cc

Issue 13990005: [SPDY] Replace SpdyIOBuffer with new SpdyBuffer class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing include Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_websocket_stream_spdy2_unittest.cc ('k') | net/spdy/spdy_write_queue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_websocket_stream_spdy3_unittest.cc
diff --git a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
index d008b1aab4b20a8e934c31948d243e3c25da20e4..5b30a439cff6f567066aa6edbd791e20b5cf2a10 100644
--- a/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
+++ b/net/spdy/spdy_websocket_stream_spdy3_unittest.cc
@@ -116,13 +116,19 @@ class SpdyWebSocketStreamEventRecorder : public SpdyWebSocketStream::Delegate {
if (!on_sent_data_.is_null())
on_sent_data_.Run(&events_.back());
}
- virtual void OnReceivedSpdyData(const char* data, int length) OVERRIDE {
+ virtual void OnReceivedSpdyData(scoped_ptr<SpdyBuffer> buffer) OVERRIDE {
+ std::string buffer_data;
+ size_t buffer_len = 0;
+ if (buffer) {
+ buffer_len = buffer->GetRemainingSize();
+ buffer_data.append(buffer->GetRemainingData(), buffer_len);
+ }
events_.push_back(
SpdyWebSocketStreamEvent(
SpdyWebSocketStreamEvent::EVENT_RECEIVED_DATA,
SpdyHeaderBlock(),
- length,
- std::string(data, length)));
+ buffer_len,
+ buffer_data));
if (!on_received_data_.is_null())
on_received_data_.Run(&events_.back());
}
« no previous file with comments | « net/spdy/spdy_websocket_stream_spdy2_unittest.cc ('k') | net/spdy/spdy_write_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698