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

Side by Side Diff: net/spdy/spdy_test_util_common.cc

Issue 987123002: Advertise HTTP/2 support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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_stream_unittest.cc ('k') | no next file » | 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 53
54 NextProtoVector SpdyNextProtos() { 54 NextProtoVector SpdyNextProtos() {
55 NextProtoVector next_protos; 55 NextProtoVector next_protos;
56 next_protos.push_back(kProtoHTTP11); 56 next_protos.push_back(kProtoHTTP11);
57 next_protos.push_back(kProtoSPDY31); 57 next_protos.push_back(kProtoSPDY31);
58 next_protos.push_back(kProtoSPDY4_14); 58 next_protos.push_back(kProtoSPDY4_14);
59 next_protos.push_back(kProtoSPDY4_15); 59 next_protos.push_back(kProtoSPDY4_15);
60 next_protos.push_back(kProtoSPDY4);
60 next_protos.push_back(kProtoQUIC1SPDY3); 61 next_protos.push_back(kProtoQUIC1SPDY3);
61 return next_protos; 62 return next_protos;
62 } 63 }
63 64
64 // Chop a frame into an array of MockWrites. 65 // Chop a frame into an array of MockWrites.
65 // |data| is the frame to chop. 66 // |data| is the frame to chop.
66 // |length| is the length of the frame to chop. 67 // |length| is the length of the frame to chop.
67 // |num_chunks| is the number of chunks to create. 68 // |num_chunks| is the number of chunks to create.
68 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) { 69 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) {
69 MockWrite* chunks = new MockWrite[num_chunks]; 70 MockWrite* chunks = new MockWrite[num_chunks];
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 } 1316 }
1316 } 1317 }
1317 1318
1318 void SpdyTestUtil::SetPriority(RequestPriority priority, 1319 void SpdyTestUtil::SetPriority(RequestPriority priority,
1319 SpdySynStreamIR* ir) const { 1320 SpdySynStreamIR* ir) const {
1320 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1321 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1321 priority, spdy_version())); 1322 priority, spdy_version()));
1322 } 1323 }
1323 1324
1324 } // namespace net 1325 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698