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

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

Issue 560573002: Introduce new SPDY Version UMA histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Subtract kProtoSPDYMinimumVersion instead of using sparse histogram. Created 6 years, 3 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_session.cc ('k') | tools/metrics/histograms/histograms.xml » ('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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (gurl.has_port()) { 46 if (gurl.has_port()) {
47 host->append(":"); 47 host->append(":");
48 host->append(gurl.port()); 48 host->append(gurl.port());
49 } 49 }
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 for (int i = kProtoMinimumVersion; i <= kProtoMaximumVersion; ++i) { 56 next_protos.push_back(kProtoHTTP11);
57 next_protos.push_back(static_cast<NextProto>(i)); 57 next_protos.push_back(kProtoDeprecatedSPDY2);
58 } 58 next_protos.push_back(kProtoSPDY3);
59 next_protos.push_back(kProtoSPDY31);
60 next_protos.push_back(kProtoSPDY4);
61 next_protos.push_back(kProtoQUIC1SPDY3);
59 return next_protos; 62 return next_protos;
60 } 63 }
61 64
62 // Chop a frame into an array of MockWrites. 65 // Chop a frame into an array of MockWrites.
63 // |data| is the frame to chop. 66 // |data| is the frame to chop.
64 // |length| is the length of the frame to chop. 67 // |length| is the length of the frame to chop.
65 // |num_chunks| is the number of chunks to create. 68 // |num_chunks| is the number of chunks to create.
66 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) { 69 MockWrite* ChopWriteFrame(const char* data, int length, int num_chunks) {
67 MockWrite* chunks = new MockWrite[num_chunks]; 70 MockWrite* chunks = new MockWrite[num_chunks];
68 int chunk_size = length / num_chunks; 71 int chunk_size = length / num_chunks;
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 } 1317 }
1315 } 1318 }
1316 1319
1317 void SpdyTestUtil::SetPriority(RequestPriority priority, 1320 void SpdyTestUtil::SetPriority(RequestPriority priority,
1318 SpdySynStreamIR* ir) const { 1321 SpdySynStreamIR* ir) const {
1319 ir->set_priority(ConvertRequestPriorityToSpdyPriority( 1322 ir->set_priority(ConvertRequestPriorityToSpdyPriority(
1320 priority, spdy_version())); 1323 priority, spdy_version()));
1321 } 1324 }
1322 1325
1323 } // namespace net 1326 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698