Chromium Code Reviews| Index: net/cert/signed_certificate_timestamp.h |
| diff --git a/net/cert/signed_certificate_timestamp.h b/net/cert/signed_certificate_timestamp.h |
| index 6ed225ca4b4870f394bcc1877ce12d374f8f234b..bda338f6f5a706d1b0973dd8ca01096d93508427 100644 |
| --- a/net/cert/signed_certificate_timestamp.h |
| +++ b/net/cert/signed_certificate_timestamp.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/memory/ref_counted.h" |
| #include "base/time/time.h" |
| #include "net/base/hash_value.h" |
| #include "net/base/net_export.h" |
| @@ -69,7 +70,16 @@ struct NET_EXPORT_PRIVATE DigitallySigned { |
| }; |
| // SignedCertificateTimestamp struct in RFC 6962, Section 3.2. |
| -struct NET_EXPORT SignedCertificateTimestamp { |
| +struct NET_EXPORT SignedCertificateTimestamp |
| + : public base::RefCountedThreadSafe<SignedCertificateTimestamp> { |
| + // Predicate functor used in maps when SignedCertificateTimestamp is used as |
| + // the key. |
| + // Compares signature bytes (timestamps could potentially not be unique). |
|
wtc
2013/11/19 21:41:44
Nit: This comment (line 77) should be moved to the
alcutter
2013/11/21 10:48:19
Comment removed since it's not applicable anymore.
|
| + struct NET_EXPORT LessThan { |
| + bool operator()(const scoped_refptr<SignedCertificateTimestamp>& lhs, |
| + const scoped_refptr<SignedCertificateTimestamp>& rhs) const; |
| + }; |
| + |
| // Version enum in RFC 6962, Section 3.2. |
| enum Version { |
| SCT_VERSION_1 = 0, |
| @@ -83,7 +93,6 @@ struct NET_EXPORT SignedCertificateTimestamp { |
| }; |
| SignedCertificateTimestamp(); |
| - ~SignedCertificateTimestamp(); |
| Version version; |
| std::string log_id; |
| @@ -93,6 +102,13 @@ struct NET_EXPORT SignedCertificateTimestamp { |
| // The origin should not participate in equality checks |
| // as the same SCT can be provided from multiple sources. |
| Origin origin; |
| + |
| + private: |
| + friend class base::RefCountedThreadSafe<SignedCertificateTimestamp>; |
| + |
| + ~SignedCertificateTimestamp(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestamp); |
| }; |
| } // namespace ct |