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

Side by Side Diff: net/cert/signed_tree_head.cc

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « net/cert/signed_tree_head.h ('k') | net/cookies/cookie_monster_store_test.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 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/signed_tree_head.h" 5 #include "net/cert/signed_tree_head.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 11 matching lines...) Expand all
22 const DigitallySigned& signature, 22 const DigitallySigned& signature,
23 const std::string& log_id) 23 const std::string& log_id)
24 : version(version), 24 : version(version),
25 timestamp(timestamp), 25 timestamp(timestamp),
26 tree_size(tree_size), 26 tree_size(tree_size),
27 signature(signature), 27 signature(signature),
28 log_id(log_id) { 28 log_id(log_id) {
29 memcpy(this->sha256_root_hash, sha256_root_hash, kSthRootHashLength); 29 memcpy(this->sha256_root_hash, sha256_root_hash, kSthRootHashLength);
30 } 30 }
31 31
32 SignedTreeHead::SignedTreeHead(const SignedTreeHead& other) = default;
33
32 SignedTreeHead::~SignedTreeHead() {} 34 SignedTreeHead::~SignedTreeHead() {}
33 35
34 void PrintTo(const SignedTreeHead& sth, std::ostream* os) { 36 void PrintTo(const SignedTreeHead& sth, std::ostream* os) {
35 (*os) << "{\n" 37 (*os) << "{\n"
36 << "\t\"version\": " << sth.version << ",\n" 38 << "\t\"version\": " << sth.version << ",\n"
37 << "\t\"timestamp\": " << sth.timestamp << ",\n" 39 << "\t\"timestamp\": " << sth.timestamp << ",\n"
38 << "\t\"tree_size\": " << sth.tree_size << ",\n" 40 << "\t\"tree_size\": " << sth.tree_size << ",\n"
39 << "\t\"sha256_root_hash\": \"" 41 << "\t\"sha256_root_hash\": \""
40 << base::HexEncode(sth.sha256_root_hash, kSthRootHashLength) 42 << base::HexEncode(sth.sha256_root_hash, kSthRootHashLength)
41 << "\",\n\t\"log_id\": \"" 43 << "\",\n\t\"log_id\": \""
42 << base::HexEncode(sth.log_id.data(), sth.log_id.size()) << "\"\n" 44 << base::HexEncode(sth.log_id.data(), sth.log_id.size()) << "\"\n"
43 << "}"; 45 << "}";
44 } 46 }
45 47
46 } // namespace ct 48 } // namespace ct
47 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/signed_tree_head.h ('k') | net/cookies/cookie_monster_store_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698