Chromium Code Reviews| Index: net/cert/signed_certificate_timestamp.cc |
| diff --git a/net/cert/signed_certificate_timestamp.cc b/net/cert/signed_certificate_timestamp.cc |
| index 0be511d41dbb64cde0fe151d0ee41f40e664eb3d..d801315703b8e3ea18be30813c9a2de093ee1345 100644 |
| --- a/net/cert/signed_certificate_timestamp.cc |
| +++ b/net/cert/signed_certificate_timestamp.cc |
| @@ -8,6 +8,30 @@ namespace net { |
| namespace ct { |
| +bool SignedCertificateTimestamp::LessThan::operator()( |
| + const scoped_refptr<SignedCertificateTimestamp>& lhs, |
| + const scoped_refptr<SignedCertificateTimestamp>& rhs) const { |
| + if (lhs.get() == rhs.get()) |
| + return false; |
| + if (lhs->signature.signature_data < rhs->signature.signature_data) |
| + return true; |
| + if (lhs->signature.signature_data == rhs->signature.signature_data) { |
| + if (lhs->log_id < rhs->log_id) |
| + return true; |
| + if (lhs->log_id == rhs->log_id) { |
| + if (lhs->timestamp < rhs->timestamp) |
| + return true; |
| + if (lhs->timestamp == rhs->timestamp) { |
| + if (lhs->extensions < rhs->extensions) |
| + return true; |
| + if (lhs->extensions == rhs->extensions) |
| + return lhs->version < rhs->version; |
| + } |
| + } |
| + } |
| + return false; |
|
wtc
2013/11/21 03:13:47
Thanks for implementing this.
This is more compli
alcutter
2013/11/21 10:56:39
That's a much more pleasing way of doing it, thank
|
| +} |
| + |
| SignedCertificateTimestamp::SignedCertificateTimestamp() {} |
| SignedCertificateTimestamp::~SignedCertificateTimestamp() {} |