| OLD | NEW |
| (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 #include "net/cert/sth_distributor.h" |
| 6 |
| 7 #include "net/cert/signed_tree_head.h" |
| 8 |
| 9 namespace net { |
| 10 |
| 11 namespace ct { |
| 12 |
| 13 STHDistributor::STHDistributor() |
| 14 : observer_list_(base::ObserverList<STHObserver>::NOTIFY_EXISTING_ONLY) {} |
| 15 |
| 16 STHDistributor::~STHDistributor() {} |
| 17 |
| 18 void STHDistributor::NewSTHObserved(const SignedTreeHead& sth) { |
| 19 FOR_EACH_OBSERVER(STHObserver, observer_list_, NewSTHObserved(sth)); |
| 20 } |
| 21 |
| 22 void STHDistributor::RegisterObserver(STHObserver* observer) { |
| 23 observer_list_.AddObserver(observer); |
| 24 } |
| 25 |
| 26 void STHDistributor::UnregisterObserver(STHObserver* observer) { |
| 27 observer_list_.RemoveObserver(observer); |
| 28 } |
| 29 |
| 30 } // namespace ct |
| 31 |
| 32 } // namespace net |
| OLD | NEW |