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

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

Issue 337093003: QuicServer: Use Chrome's header parsing rather than Balsa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_server_3
Patch Set: Fix build on many platforms Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "net/spdy/hpack_huffman_aggregator.h" 4 #include "net/spdy/hpack_huffman_aggregator.h"
5 5
6 #include "base/metrics/bucket_ranges.h" 6 #include "base/metrics/bucket_ranges.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/metrics/sample_vector.h" 9 #include "base/metrics/sample_vector.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 HostPortPair endpoint = HostPortPair(request.url.HostNoBrackets(), 52 HostPortPair endpoint = HostPortPair(request.url.HostNoBrackets(),
53 request.url.EffectiveIntPort()); 53 request.url.EffectiveIntPort());
54 HpackEncoder* encoder = ObtainEncoder( 54 HpackEncoder* encoder = ObtainEncoder(
55 SpdySessionKey(endpoint, proxy, request.privacy_mode)); 55 SpdySessionKey(endpoint, proxy, request.privacy_mode));
56 56
57 // Convert and encode the request and response header sets. 57 // Convert and encode the request and response header sets.
58 { 58 {
59 SpdyHeaderBlock headers; 59 SpdyHeaderBlock headers;
60 CreateSpdyHeadersFromHttpRequest( 60 CreateSpdyHeadersFromHttpRequest(
61 request, request_headers, &headers, SPDY4, false); 61 request, request_headers, SPDY4, false, &headers);
62 62
63 std::string tmp_out; 63 std::string tmp_out;
64 encoder->EncodeHeaderSet(headers, &tmp_out); 64 encoder->EncodeHeaderSet(headers, &tmp_out);
65 } 65 }
66 { 66 {
67 SpdyHeaderBlock headers; 67 SpdyHeaderBlock headers;
68 CreateSpdyHeadersFromHttpResponse(response_headers, &headers); 68 CreateSpdyHeadersFromHttpResponse(response_headers, &headers);
69 69
70 std::string tmp_out; 70 std::string tmp_out;
71 encoder->EncodeHeaderSet(headers, &tmp_out); 71 encoder->EncodeHeaderSet(headers, &tmp_out);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 base::LinearHistogram::FactoryGet( 174 base::LinearHistogram::FactoryGet(
175 kHistogramName, kRangeMin, kRangeMax, kBucketCount, 175 kHistogramName, kRangeMin, kRangeMax, kBucketCount,
176 base::HistogramBase::kUmaTargetedHistogramFlag)); 176 base::HistogramBase::kUmaTargetedHistogramFlag));
177 177
178 // Clear counts. 178 // Clear counts.
179 counts_.assign(counts_.size(), 0); 179 counts_.assign(counts_.size(), 0);
180 total_counts_ = 0; 180 total_counts_ = 0;
181 } 181 }
182 182
183 } // namespace net 183 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698