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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 15784005: Merge ConstructSpdyConnect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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_test_util_common.h ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index b5e9e0fda811ff6ad40c898724570ba030eef0d4..bbfd86381020c10a47c44b1a8ce094bea9de44b7 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -822,6 +822,29 @@ SpdyFrame* SpdyTestUtil::ConstructSpdyGet(const char* const extra_headers[],
0);
}
+SpdyFrame* SpdyTestUtil::ConstructSpdyConnect(
+ const char* const extra_headers[],
+ int extra_header_count,
+ int stream_id) const {
+ const bool spdy2 = is_spdy2();
+ const char* const kConnectHeaders[] = {
+ spdy2 ? "method" : ":method", "CONNECT",
+ spdy2 ? "url" : ":path", "www.google.com:443",
+ spdy2 ? "host" : ":host", "www.google.com",
+ spdy2 ? "version" : ":version", "HTTP/1.1",
+ };
+ return ConstructSpdyControlFrame(extra_headers,
+ extra_header_count,
+ /*compressed*/ false,
+ stream_id,
+ LOWEST,
+ SYN_STREAM,
+ CONTROL_FLAG_NONE,
+ kConnectHeaders,
+ arraysize(kConnectHeaders),
+ 0);
+}
+
scoped_ptr<SpdyFramer> SpdyTestUtil::CreateFramer() const {
return scoped_ptr<SpdyFramer>(new SpdyFramer(spdy_version_));
}
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | net/spdy/spdy_test_util_spdy2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698