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

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

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 4
5 #include <list> 5 #include <list>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/base/net_export.h" 9 #include "net/base/net_export.h"
10 #include "net/spdy/spdy_header_block.h" 10 #include "net/spdy/spdy_header_block.h"
(...skipping 17 matching lines...) Expand all
28 friend class test::HpackHuffmanAggregatorPeer; 28 friend class test::HpackHuffmanAggregatorPeer;
29 29
30 HpackHuffmanAggregator(); 30 HpackHuffmanAggregator();
31 ~HpackHuffmanAggregator(); 31 ~HpackHuffmanAggregator();
32 32
33 // Encodes the request and response headers of the transaction with an 33 // Encodes the request and response headers of the transaction with an
34 // HpackEncoder keyed on the transaction's SpdySessionKey. Literal headers 34 // HpackEncoder keyed on the transaction's SpdySessionKey. Literal headers
35 // emitted by that encoder are aggregated into internal character counts, 35 // emitted by that encoder are aggregated into internal character counts,
36 // which are periodically published to a UMA histogram. 36 // which are periodically published to a UMA histogram.
37 void AggregateTransactionCharacterCounts( 37 void AggregateTransactionCharacterCounts(
38 const HttpRequestInfo& request, 38 const HttpRequestInfo& request,
39 const HttpRequestHeaders& request_headers, 39 const HttpRequestHeaders& request_headers,
40 const ProxyServer& proxy, 40 const ProxyServer& proxy,
41 const HttpResponseHeaders& response_headers); 41 const HttpResponseHeaders& response_headers);
42 42
43 // Returns whether the aggregator is enabled for the session by a field trial. 43 // Returns whether the aggregator is enabled for the session by a field trial.
44 static bool UseAggregator(); 44 static bool UseAggregator();
45 45
46 private: 46 private:
47 typedef std::pair<SpdySessionKey, HpackEncoder*> OriginEncoder; 47 typedef std::pair<SpdySessionKey, HpackEncoder*> OriginEncoder;
48 typedef std::list<OriginEncoder> OriginEncoders; 48 typedef std::list<OriginEncoder> OriginEncoders;
49 49
50 // Returns true if the request is considered cross-origin, 50 // Returns true if the request is considered cross-origin,
51 // and should not be aggregated. 51 // and should not be aggregated.
(...skipping 13 matching lines...) Expand all
65 std::vector<size_t> counts_; 65 std::vector<size_t> counts_;
66 size_t total_counts_; 66 size_t total_counts_;
67 67
68 OriginEncoders encoders_; 68 OriginEncoders encoders_;
69 size_t max_encoders_; 69 size_t max_encoders_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(HpackHuffmanAggregator); 71 DISALLOW_COPY_AND_ASSIGN(HpackHuffmanAggregator);
72 }; 72 };
73 73
74 } // namespace net 74 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698