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

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

Issue 145353017: Update HPACK implementation to draft 05 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « net/spdy/hpack_constants.h ('k') | net/spdy/hpack_encoding_context.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 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 #ifndef NET_SPDY_HPACK_ENCODER_H_ 5 #ifndef NET_SPDY_HPACK_ENCODER_H_
6 #define NET_SPDY_HPACK_ENCODER_H_ 6 #define NET_SPDY_HPACK_ENCODER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
14 #include "net/spdy/hpack_encoding_context.h" 14 #include "net/spdy/hpack_encoding_context.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 // An HpackEncoder encodes header sets as outlined in 18 // An HpackEncoder encodes header sets as outlined in
19 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-04 19 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-05
20 // . 20 // .
21 class NET_EXPORT_PRIVATE HpackEncoder { 21 class NET_EXPORT_PRIVATE HpackEncoder {
22 public: 22 public:
23 explicit HpackEncoder(uint32 max_string_literal_size); 23 explicit HpackEncoder(uint32 max_string_literal_size);
24 ~HpackEncoder(); 24 ~HpackEncoder();
25 25
26 // Encodes the given header set into the given string. Returns 26 // Encodes the given header set into the given string. Returns
27 // whether or not the encoding was successful. 27 // whether or not the encoding was successful.
28 bool EncodeHeaderSet(const std::map<std::string, std::string>& header_set, 28 bool EncodeHeaderSet(const std::map<std::string, std::string>& header_set,
29 std::string* output); 29 std::string* output);
30 30
31 private: 31 private:
32 const uint32 max_string_literal_size_; 32 const uint32 max_string_literal_size_;
33 HpackEncodingContext context_; 33 HpackEncodingContext context_;
34 34
35 DISALLOW_COPY_AND_ASSIGN(HpackEncoder); 35 DISALLOW_COPY_AND_ASSIGN(HpackEncoder);
36 }; 36 };
37 37
38 } // namespace net 38 } // namespace net
39 39
40 #endif // NET_SPDY_HPACK_ENCODER_H_ 40 #endif // NET_SPDY_HPACK_ENCODER_H_
OLDNEW
« no previous file with comments | « net/spdy/hpack_constants.h ('k') | net/spdy/hpack_encoding_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698