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

Unified Diff: net/spdy/spdy_test_util.cc

Issue 3079002: Refactor SpdyHttpStream to implement HttpStream. Required adding a new... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 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
« net/spdy/spdy_http_stream.cc ('K') | « net/spdy/spdy_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util.cc
===================================================================
--- net/spdy/spdy_test_util.cc (revision 53864)
+++ net/spdy/spdy_test_util.cc (working copy)
@@ -248,6 +248,43 @@
return n;
}
+// Constructs a standard SPDY GET SYN packet, optionally compressed
+// for the url |url|.
+// |extra_headers| are the extra header-value pairs, which typically
+// will vary the most between calls.
+// Returns a SpdyFrame.
+spdy::SpdyFrame* ConstructSpdyGet(const char* const url,
+ bool compressed,
+ int stream_id,
+ RequestPriority request_priority) {
+ const SpdyHeaderInfo kSynStartHeader = {
+ spdy::SYN_STREAM, // Kind = Syn
+ stream_id, // Stream ID
+ 0, // Associated stream ID
+ request_priority, // Priority
+ spdy::CONTROL_FLAG_FIN, // Control Flags
+ compressed, // Compressed
+ spdy::INVALID, // Status
+ NULL, // Data
+ 0, // Length
+ spdy::DATA_FLAG_NONE // Data Flags
+ };
+ const char* const headers[] = {
+ "method",
+ "GET",
+ "url",
+ url,
+ "version",
+ "HTTP/1.1"
+ };
+ return ConstructSpdyPacket(
+ kSynStartHeader,
+ NULL,
+ 0,
+ headers,
+ arraysize(headers) / 2);
+}
+
// Constructs a standard SPDY GET SYN packet, optionally compressed.
// |extra_headers| are the extra header-value pairs, which typically
// will vary the most between calls.
« net/spdy/spdy_http_stream.cc ('K') | « net/spdy/spdy_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698