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 #ifndef CONTENT_BROWSER_SCT_STORE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_SCT_STORE_IMPL_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "base/memory/singleton.h" |
| 11 #include "base/synchronization/lock.h" |
| 12 #include "content/browser/renderer_data_memoizing_store.h" |
| 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" |
| 15 #include "content/public/browser/sct_store.h" |
| 16 #include "net/cert/signed_certificate_timestamp.h" |
| 17 |
| 18 namespace content { |
| 19 |
| 20 class SCTStoreImpl : public SignedCertificateTimestampStore { |
| 21 public: |
| 22 // Returns the singleton instance of the SCTStore. |
| 23 static SCTStoreImpl* GetInstance(); |
| 24 |
| 25 // SCTStore implementation: |
| 26 virtual int StoreSignedCertificateTimestamp( |
| 27 net::ct::SignedCertificateTimestamp* sct, |
| 28 int render_process_host_id) OVERRIDE; |
| 29 virtual bool RetrieveSignedCertificateTimestamp( |
| 30 int sct_id, |
| 31 scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) OVERRIDE; |
| 32 |
| 33 protected: |
| 34 SCTStoreImpl(); |
| 35 virtual ~SCTStoreImpl(); |
| 36 |
| 37 private: |
| 38 RendererDataMemoizingStore<net::ct::SignedCertificateTimestamp> store_; |
| 39 friend struct DefaultSingletonTraits<SCTStoreImpl>; |
| 40 DISALLOW_COPY_AND_ASSIGN(SCTStoreImpl); |
| 41 }; |
| 42 |
| 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_BROWSER_SCT_STORE_IMPL_H_ |
OLD | NEW |