Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "net/cert/merkle_audit_proof.h" | 5 #include "net/cert/merkle_audit_proof.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 namespace ct { | 10 namespace ct { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 ++length; | 23 ++length; |
| 24 index /= 2; | 24 index /= 2; |
| 25 last_node /= 2; | 25 last_node /= 2; |
| 26 } | 26 } |
| 27 | 27 |
| 28 return length; | 28 return length; |
| 29 } | 29 } |
| 30 | 30 |
| 31 MerkleAuditProof::MerkleAuditProof() {} | 31 MerkleAuditProof::MerkleAuditProof() {} |
| 32 | 32 |
| 33 MerkleAuditProof::MerkleAuditProof(const MerkleAuditProof& other) | |
| 34 : leaf_index(other.leaf_index), nodes(other.nodes) {} | |
|
Ryan Sleevi
2016/12/14 01:34:16
Why do you not need to copy tree size?
Eran Messeri
2016/12/22 16:12:12
I do - done.
| |
| 35 | |
| 33 MerkleAuditProof::MerkleAuditProof(uint64_t leaf_index, | 36 MerkleAuditProof::MerkleAuditProof(uint64_t leaf_index, |
| 34 uint64_t tree_size, | 37 uint64_t tree_size, |
| 35 const std::vector<std::string>& audit_path) | 38 const std::vector<std::string>& audit_path) |
| 36 : leaf_index(leaf_index), tree_size(tree_size), nodes(audit_path) {} | 39 : leaf_index(leaf_index), tree_size(tree_size), nodes(audit_path) {} |
| 37 | 40 |
| 38 MerkleAuditProof::~MerkleAuditProof() {} | 41 MerkleAuditProof::~MerkleAuditProof() {} |
| 39 | 42 |
| 40 } // namespace ct | 43 } // namespace ct |
| 41 } // namespace net | 44 } // namespace net |
| OLD | NEW |