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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 compressed, 815 compressed,
816 stream_id, 816 stream_id,
817 request_priority, 817 request_priority,
818 SYN_STREAM, 818 SYN_STREAM,
819 CONTROL_FLAG_FIN, 819 CONTROL_FLAG_FIN,
820 kStandardGetHeaders, 820 kStandardGetHeaders,
821 arraysize(kStandardGetHeaders), 821 arraysize(kStandardGetHeaders),
822 0); 822 0);
823 } 823 }
824 824
825 SpdyFrame* SpdyTestUtil::ConstructSpdyConnect(
826 const char* const extra_headers[],
827 int extra_header_count,
828 int stream_id) const {
829 const bool spdy2 = is_spdy2();
830 const char* const kConnectHeaders[] = {
831 spdy2 ? "method" : ":method", "CONNECT",
832 spdy2 ? "url" : ":path", "www.google.com:443",
833 spdy2 ? "host" : ":host", "www.google.com",
834 spdy2 ? "version" : ":version", "HTTP/1.1",
835 };
836 return ConstructSpdyControlFrame(extra_headers,
837 extra_header_count,
838 /*compressed*/ false,
839 stream_id,
840 LOWEST,
841 SYN_STREAM,
842 CONTROL_FLAG_NONE,
843 kConnectHeaders,
844 arraysize(kConnectHeaders),
845 0);
846 }
847
825 scoped_ptr<SpdyFramer> SpdyTestUtil::CreateFramer() const { 848 scoped_ptr<SpdyFramer> SpdyTestUtil::CreateFramer() const {
826 return scoped_ptr<SpdyFramer>(new SpdyFramer(spdy_version_)); 849 return scoped_ptr<SpdyFramer>(new SpdyFramer(spdy_version_));
827 } 850 }
828 851
829 } // namespace net 852 } // namespace net
OLDNEW
« 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