| Index: net/cert/signed_tree_head.cc
|
| diff --git a/net/cert/signed_tree_head.cc b/net/cert/signed_tree_head.cc
|
| index ef1ab708c7c9e18c5f938e58368ae3a66b719a7d..00fc1342d65a61825446d6d8542d170e8a21724e 100644
|
| --- a/net/cert/signed_tree_head.cc
|
| +++ b/net/cert/signed_tree_head.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include <string.h>
|
|
|
| +#include <iostream>
|
| +
|
| #include "base/strings/string_number_conversions.h"
|
|
|
| namespace net {
|
| @@ -29,17 +31,16 @@ SignedTreeHead::SignedTreeHead(Version version,
|
|
|
| SignedTreeHead::~SignedTreeHead() {}
|
|
|
| -std::ostream& operator<<(std::ostream& stream, const SignedTreeHead& sth) {
|
| - return stream << "{\n"
|
| - << "\t\"version\": " << sth.version << ",\n"
|
| - << "\t\"timestamp\": " << sth.timestamp << ",\n"
|
| - << "\t\"tree_size\": " << sth.tree_size << ",\n"
|
| - << "\t\"sha256_root_hash\": \""
|
| - << base::HexEncode(sth.sha256_root_hash, kSthRootHashLength)
|
| - << "\",\n\t\"log_id\": \""
|
| - << base::HexEncode(sth.log_id.data(), sth.log_id.size())
|
| - << "\"\n"
|
| - << "}";
|
| +void PrintTo(const SignedTreeHead& sth, std::ostream* os) {
|
| + (*os) << "{\n"
|
| + << "\t\"version\": " << sth.version << ",\n"
|
| + << "\t\"timestamp\": " << sth.timestamp << ",\n"
|
| + << "\t\"tree_size\": " << sth.tree_size << ",\n"
|
| + << "\t\"sha256_root_hash\": \""
|
| + << base::HexEncode(sth.sha256_root_hash, kSthRootHashLength)
|
| + << "\",\n\t\"log_id\": \""
|
| + << base::HexEncode(sth.log_id.data(), sth.log_id.size()) << "\"\n"
|
| + << "}";
|
| }
|
|
|
| } // namespace ct
|
|
|