Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / signed_certificate_timestamp_store_impl.h
blob8eba0350022e6dccd3eede48addb58cb4c6a54ee
1 // Copyright 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.
5 #ifndef CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
6 #define CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_
8 #include "content/browser/renderer_data_memoizing_store.h"
9 #include "content/public/browser/signed_certificate_timestamp_store.h"
10 #include "net/cert/signed_certificate_timestamp.h"
12 template <typename T> struct DefaultSingletonTraits;
14 namespace content {
16 class SignedCertificateTimestampStoreImpl
17 : public SignedCertificateTimestampStore {
18 public:
19 // Returns the singleton instance of the SignedCertificateTimestampStore.
20 static SignedCertificateTimestampStoreImpl* GetInstance();
22 // SignedCertificateTimestampStore implementation:
23 int Store(net::ct::SignedCertificateTimestamp* sct,
24 int render_process_host_id) override;
25 bool Retrieve(
26 int sct_id,
27 scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) override;
29 private:
30 friend struct DefaultSingletonTraits<SignedCertificateTimestampStoreImpl>;
32 SignedCertificateTimestampStoreImpl();
33 ~SignedCertificateTimestampStoreImpl() override;
35 RendererDataMemoizingStore<net::ct::SignedCertificateTimestamp> store_;
37 DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampStoreImpl);
40 } // namespace content
42 #endif // CONTENT_BROWSER_SIGNED_CERTIFICATE_TIMESTAMP_STORE_IMPL_H_