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)#include "content/browser/signed_certificate_timestamp_store_impl.h"
6f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
7f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)#include "base/memory/singleton.h"
8f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
9f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)namespace content {
10f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
11f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// static
12f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStore*
13f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStore::GetInstance() {
14f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return SignedCertificateTimestampStoreImpl::GetInstance();
15f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
17f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)// static
18f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStoreImpl*
19f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStoreImpl::GetInstance() {
20f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return Singleton<SignedCertificateTimestampStoreImpl>::get();
21f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
22f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
23f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStoreImpl::SignedCertificateTimestampStoreImpl() {}
24f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
25f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)SignedCertificateTimestampStoreImpl::~SignedCertificateTimestampStoreImpl() {}
26f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
27f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)int SignedCertificateTimestampStoreImpl::Store(
28f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    net::ct::SignedCertificateTimestamp* sct,
29f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    int process_id) {
30f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return store_.Store(sct, process_id);
31f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
32f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
33f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)bool SignedCertificateTimestampStoreImpl::Retrieve(
34f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    int sct_id,
35f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)    scoped_refptr<net::ct::SignedCertificateTimestamp>* sct) {
36f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)  return store_.Retrieve(sct_id, sct);
37f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}
38f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)
39f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)}  // namespace content
40