 Chromium Code Reviews
 Chromium Code Reviews Issue 2551153003:
  Add static domain security state generator tool.  (Closed)
    
  
    Issue 2551153003:
  Add static domain security state generator tool.  (Closed) 
  | OLD | NEW | 
|---|---|
| (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_ | |
| OLD | NEW |