OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ios/web/net/cert_store_impl.h" | 5 #include "ios/web/net/cert_store_impl.h" |
6 | 6 |
7 namespace web { | 7 namespace web { |
8 | 8 |
9 // static | 9 // static |
10 CertStore* CertStore::GetInstance() { | 10 CertStore* CertStore::GetInstance() { |
11 return CertStoreImpl::GetInstance(); | 11 return CertStoreImpl::GetInstance(); |
12 } | 12 } |
13 | 13 |
14 // static | 14 // static |
15 CertStoreImpl* CertStoreImpl::GetInstance() { | 15 CertStoreImpl* CertStoreImpl::GetInstance() { |
16 return Singleton<CertStoreImpl>::get(); | 16 return base::Singleton<CertStoreImpl>::get(); |
17 } | 17 } |
18 | 18 |
19 CertStoreImpl::CertStoreImpl() { | 19 CertStoreImpl::CertStoreImpl() { |
20 } | 20 } |
21 | 21 |
22 CertStoreImpl::~CertStoreImpl() { | 22 CertStoreImpl::~CertStoreImpl() { |
23 } | 23 } |
24 | 24 |
25 int CertStoreImpl::StoreCert(net::X509Certificate* cert, int group_id) { | 25 int CertStoreImpl::StoreCert(net::X509Certificate* cert, int group_id) { |
26 return store_.Store(cert, group_id); | 26 return store_.Store(cert, group_id); |
27 } | 27 } |
28 | 28 |
29 bool CertStoreImpl::RetrieveCert(int cert_id, | 29 bool CertStoreImpl::RetrieveCert(int cert_id, |
30 scoped_refptr<net::X509Certificate>* cert) { | 30 scoped_refptr<net::X509Certificate>* cert) { |
31 return store_.Retrieve(cert_id, cert); | 31 return store_.Retrieve(cert_id, cert); |
32 } | 32 } |
33 | 33 |
34 void CertStoreImpl::RemoveCertsForGroup(int group_id) { | 34 void CertStoreImpl::RemoveCertsForGroup(int group_id) { |
35 store_.RemoveForRequestTracker(group_id); | 35 store_.RemoveForRequestTracker(group_id); |
36 } | 36 } |
37 | 37 |
38 } // namespace web | 38 } // namespace web |
OLD | NEW |