OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 "content/browser/sct_store_impl.h" |
| 6 |
| 7 #include <algorithm> |
| 8 #include <functional> |
| 9 |
| 10 #include "base/bind.h" |
| 11 #include "base/stl_util.h" |
| 12 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 13 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/notification_service.h" |
| 16 #include "content/public/browser/notification_types.h" |
| 17 |
| 18 namespace content { |
| 19 |
| 20 // static |
| 21 SignedCertificateTimestampStore* |
| 22 SignedCertificateTimestampStore::GetInstance() { |
| 23 return SCTStoreImpl::GetInstance(); |
| 24 } |
| 25 |
| 26 // static |
| 27 SCTStoreImpl* SCTStoreImpl::GetInstance() { |
| 28 return Singleton<SCTStoreImpl>::get(); |
| 29 } |
| 30 |
| 31 SCTStoreImpl::SCTStoreImpl() : store_() {} |
| 32 |
| 33 SCTStoreImpl::~SCTStoreImpl() {} |
| 34 |
| 35 int SCTStoreImpl::StoreSignedCertificateTimestamp( |
| 36 net::ct::SignedCertificateTimestamp* sct, |
| 37 int process_id) { |
| 38 return store_.Store(sct, process_id); |
| 39 } |
| 40 |
| 41 bool SCTStoreImpl::RetrieveSignedCertificateTimestamp( |
| 42 int sct_id, |
| 43 scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) { |
| 44 return store_.Retrieve(sct_id, sct); |
| 45 } |
| 46 |
| 47 } // namespace content |
OLD | NEW |