1f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// found in the LICENSE file. 4f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 5f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#ifndef CONTENT_BROWSER_SIGNED_CERTIFICATE_STORE_IMPL_H_ 6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#define CONTENT_BROWSER_SIGNED_CERTIFICATE_STORE_IMPL_H_ 7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/browser/renderer_data_memoizing_store.h" 9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "content/public/browser/signed_certificate_timestamp_store.h" 10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "net/cert/signed_certificate_timestamp.h" 11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)template <typename T> struct DefaultSingletonTraits; 13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace content { 15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)class SignedCertificateTimestampStoreImpl 17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) : public SignedCertificateTimestampStore { 18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) public: 19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // Returns the singleton instance of the SignedCertificateTimestampStore. 20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) static SignedCertificateTimestampStoreImpl* GetInstance(); 21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) // SignedCertificateTimestampStore implementation: 23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) virtual int Store( 24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) net::ct::SignedCertificateTimestamp* sct, 25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) int render_process_host_id) OVERRIDE; 26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) virtual bool Retrieve( 27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) int sct_id, 28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) OVERRIDE; 29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) private: 31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) friend struct DefaultSingletonTraits<SignedCertificateTimestampStoreImpl>; 32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) SignedCertificateTimestampStoreImpl(); 34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) virtual ~SignedCertificateTimestampStoreImpl(); 35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) RendererDataMemoizingStore<net::ct::SignedCertificateTimestamp> store_; 37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(SignedCertificateTimestampStoreImpl); 39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}; 40f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 41f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)} // namespace content 42f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles) 43f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#endif // CONTENT_BROWSER_SIGNED_CERTIFICATE_STORE_IMPL_H_ 44