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

Unified Diff: net/websockets/websocket_frame.h

Issue 10796107: WebSocketFrameChunk should use IOBuffer to hold data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test expectation Created 8 years, 5 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 | « no previous file | net/websockets/websocket_frame.cc » ('j') | net/websockets/websocket_frame_parser.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame.h
diff --git a/net/websockets/websocket_frame.h b/net/websockets/websocket_frame.h
index bce6fa22dbf4097f8e17b52ee9544749ab19f233..9f7c7fd6fc26b471fd38cc8db84a7f2f95ea9068 100644
--- a/net/websockets/websocket_frame.h
+++ b/net/websockets/websocket_frame.h
@@ -8,11 +8,14 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "net/base/net_export.h"
namespace net {
+class IOBufferWithSize;
+
// Represents a WebSocket frame header.
//
// Members of this class correspond to each element in WebSocket frame header
@@ -73,8 +76,9 @@ struct NET_EXPORT_PRIVATE WebSocketFrameChunk {
// Indicates this part is the last chunk of a frame.
bool final_chunk;
- // |data| is always unmasked even if the frame is masked.
- std::vector<char> data;
+ // |data| is always unmasked even if the frame is masked. |data| might be
+ // null in the first chunk.
+ scoped_refptr<IOBufferWithSize> data;
};
// Contains four-byte data representing "masking key" of WebSocket frames.
« no previous file with comments | « no previous file | net/websockets/websocket_frame.cc » ('j') | net/websockets/websocket_frame_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698