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

Side by Side Diff: net/tools/domain_security_preload_generator/huffman/huffman_node.h

Issue 2551153003: Add static domain security state generator tool. (Closed)
Patch Set: fix base64 issue and accidental replace. Created 4 years 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_HUFFMAN_HUFFMAN_NODE_H_
6 #define NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_HUFFMAN_HUFFMAN_NODE_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 namespace net {
13
14 class HuffmanNode {
15 public:
16 HuffmanNode(uint8_t value,
17 int count,
agl 2016/12/06 18:51:36 counts have been uint32_t's prior to this. Types s
martijnc 2016/12/07 22:37:54 Done.
18 std::unique_ptr<HuffmanNode> left,
19 std::unique_ptr<HuffmanNode> right);
20 ~HuffmanNode();
21
22 bool IsLeaf() const;
23
24 uint8_t value() const { return value_; }
25 int count() const { return count_; }
26 const std::unique_ptr<HuffmanNode>& left() const { return left_; }
27 const std::unique_ptr<HuffmanNode>& right() const { return right_; }
28
29 private:
30 uint8_t value_;
31 int count_;
32 std::unique_ptr<HuffmanNode> left_;
33 std::unique_ptr<HuffmanNode> right_;
34 };
35
36 } // namespace net
37
38 #endif // NET_TOOLS_DOMAIN_SECURITY_PRELOAD_GENERATOR_HUFFMAN_HUFFMAN_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698