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

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

Issue 72333007: Add an SignedCertificateTimetampStore, making SignedCertificateTimestamp be refcounted to aid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@piecewise
Patch Set: Fixes for wtc. Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_certificate_timestamp.h" 5 #include "net/cert/signed_certificate_timestamp.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 namespace ct { 9 namespace ct {
10 10
11 bool SignedCertificateTimestamp::LessThan::operator()(
12 const scoped_refptr<SignedCertificateTimestamp>& lhs,
13 const scoped_refptr<SignedCertificateTimestamp>& rhs) const {
14 if (lhs.get() == rhs.get())
15 return false;
16 if (lhs->signature.signature_data != rhs->signature.signature_data)
17 return lhs->signature.signature_data < rhs->signature.signature_data;
18 if (lhs->log_id != rhs->log_id)
19 return lhs->log_id < rhs->log_id;
20 if (lhs->timestamp != rhs->timestamp)
21 return lhs->timestamp < rhs->timestamp;
22 if (lhs->extensions != rhs->extensions)
23 return lhs->extensions < rhs->extensions;
24 return lhs->version < rhs->version;
25 }
26
11 SignedCertificateTimestamp::SignedCertificateTimestamp() {} 27 SignedCertificateTimestamp::SignedCertificateTimestamp() {}
12 28
13 SignedCertificateTimestamp::~SignedCertificateTimestamp() {} 29 SignedCertificateTimestamp::~SignedCertificateTimestamp() {}
14 30
15 LogEntry::LogEntry() {} 31 LogEntry::LogEntry() {}
16 32
17 LogEntry::~LogEntry() {} 33 LogEntry::~LogEntry() {}
18 34
19 void LogEntry::Reset() { 35 void LogEntry::Reset() {
20 type = LogEntry::LOG_ENTRY_TYPE_X509; 36 type = LogEntry::LOG_ENTRY_TYPE_X509;
21 leaf_certificate.clear(); 37 leaf_certificate.clear();
22 tbs_certificate.clear(); 38 tbs_certificate.clear();
23 } 39 }
24 40
25 DigitallySigned::DigitallySigned() {} 41 DigitallySigned::DigitallySigned() {}
26 42
27 DigitallySigned::~DigitallySigned() {} 43 DigitallySigned::~DigitallySigned() {}
28 44
29 } // namespace ct 45 } // namespace ct
30 46
31 } // namespace net 47 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698