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

Side by Side Diff: components/certificate_transparency/tree_state_tracker.h

Issue 1845113003: Certificate Transparency: Start tracking logs' state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review Created 4 years, 8 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
6 #define COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
7
8 #include <map>
9 #include <string>
10 #include <vector>
11
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "net/cert/ct_observer.h"
15
16 namespace net {
17 class CTLogVerifier;
18 class X509Certificate;
19
20 namespace ct {
21 struct SignedCertificateTimestamp;
22 struct SignedTreeHead;
23 } // namespace ct
24
25 } // namespace net
26
27 namespace certificate_transparency {
28
29 // Entry point for handling notification of new STHs/SCTs for a particular
30 // browsing session.
31 // TODO(eranm): Export the inclusion check status of SCTs+Certs so it can
32 // be used in the DevTools Security panel, for example - crbug.com/506227
33 class TreeStateTracker : public net::ct::CTObserver {
34 public:
35 explicit TreeStateTracker(
36 const std::vector<scoped_refptr<const net::CTLogVerifier>>& ct_logs);
Ryan Sleevi 2016/04/14 16:56:16 Pass by value?
Eran Messeri 2016/04/18 22:02:12 Done.
37 ~TreeStateTracker() override;
38
39 // net::ct::CTVerifier::Observer implementation.
40 // Delegates to the tree tracker corresponding to the log that issued the SCT.
41 void OnSCTVerified(net::X509Certificate* cert,
42 const net::ct::SignedCertificateTimestamp* sct) override;
43
44 // net::ct::STHObserver implementation.
45 // Delegates to the tree tracker corresponding to the log that issued the STH.
46 void NewSTHObserved(const net::ct::SignedTreeHead& sth) override;
47
48 private:
49 // Holds the SingleTreeTracker for each log
50 std::map<std::string, scoped_ptr<net::ct::CTObserver>> tree_trackers_;
51
52 DISALLOW_COPY_AND_ASSIGN(TreeStateTracker);
53 };
54
55 } // namespace certificate_transparency
56
57 #endif // COMPONENTS_CERTIFICATE_TRANSPARENCY_TREE_STATE_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698