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

Unified Diff: net/tools/domain_security_preload_generator/huffman/huffman_node.cc

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 side-by-side diff with in-line comments
Download patch
Index: net/tools/domain_security_preload_generator/huffman/huffman_node.cc
diff --git a/net/tools/domain_security_preload_generator/huffman/huffman_node.cc b/net/tools/domain_security_preload_generator/huffman/huffman_node.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8305f48a0c9ec3ce796df67d56eca65d87502a0d
--- /dev/null
+++ b/net/tools/domain_security_preload_generator/huffman/huffman_node.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/tools/domain_security_preload_generator/huffman/huffman_node.h"
+
+namespace net {
+
+HuffmanNode::HuffmanNode(uint8_t value,
+ int count,
+ std::unique_ptr<HuffmanNode> left,
+ std::unique_ptr<HuffmanNode> right)
+ : value_(value),
+ count_(count),
+ left_(std::move(left)),
+ right_(std::move(right)) {}
+
+HuffmanNode::~HuffmanNode() {}
+
+bool HuffmanNode::IsLeaf() const {
+ return left_.get() == nullptr && right_.get() == nullptr;
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698