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

Side by Side Diff: net/cert/sth_observer.h

Issue 1853753003: Certificate Transparency: New component for obtaining fresh STHs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing compilation errors on ChromeOS 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 NET_CERT_STH_OBSERVER_H_
6 #define NET_CERT_STH_OBSERVER_H_
7
8 #include <set>
9
10 #include "net/base/net_export.h"
11
12 namespace net {
13
14 namespace ct {
15
16 struct SignedTreeHead;
17
18 // Interface for receiving notifications of new STHs observed.
19 class NET_EXPORT STHObserver {
20 public:
21 virtual ~STHObserver() {}
22
23 // Called with a new |sth| when one is observed.
24 // Expected to be called on the IO thread.
25 virtual void NewSTHObserved(const SignedTreeHead& sth) = 0;
26 };
27
28 // Interface for registering/unregistering observers.
29 class NET_EXPORT STHReporter {
Ryan Sleevi 2016/04/06 18:32:51 Shouldn't this be in its own header? STHDistributo
Eran Messeri 2016/04/07 11:38:03 You're right, I've separated them into different h
30 public:
31 virtual ~STHReporter() {}
32
33 virtual void RegisterObserver(STHObserver* observer) = 0;
34 virtual void UnregisterObserver(STHObserver* observer) = 0;
35 };
36
37 } // namespace ct
38
39 } // namespace net
40
41 #endif // NET_CERT_STH_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698