OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_BROWSER_CERT_STORE_H_ | 5 #ifndef CONTENT_BROWSER_CERT_STORE_H_ |
6 #define CONTENT_BROWSER_CERT_STORE_H_ | 6 #define CONTENT_BROWSER_CERT_STORE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 // cert is removed from the store. | 35 // cert is removed from the store. |
36 // Note: ids starts at 1. | 36 // Note: ids starts at 1. |
37 int StoreCert(net::X509Certificate* cert, int render_process_host_id); | 37 int StoreCert(net::X509Certificate* cert, int render_process_host_id); |
38 | 38 |
39 // Tries to retrieve the previously stored cert associated with the specified | 39 // Tries to retrieve the previously stored cert associated with the specified |
40 // |cert_id|. Returns whether the cert could be found, and, if |cert| is | 40 // |cert_id|. Returns whether the cert could be found, and, if |cert| is |
41 // non-NULL, copies it in. | 41 // non-NULL, copies it in. |
42 bool RetrieveCert(int cert_id, scoped_refptr<net::X509Certificate>* cert); | 42 bool RetrieveCert(int cert_id, scoped_refptr<net::X509Certificate>* cert); |
43 | 43 |
44 // NotificationObserver implementation. | 44 // NotificationObserver implementation. |
45 virtual void Observe(NotificationType type, | 45 virtual void Observe(int type, |
46 const NotificationSource& source, | 46 const NotificationSource& source, |
47 const NotificationDetails& details); | 47 const NotificationDetails& details); |
48 | 48 |
49 private: | 49 private: |
50 friend struct DefaultSingletonTraits<CertStore>; | 50 friend struct DefaultSingletonTraits<CertStore>; |
51 | 51 |
52 CertStore(); | 52 CertStore(); |
53 virtual ~CertStore(); | 53 virtual ~CertStore(); |
54 | 54 |
55 // Remove the specified cert from id_to_cert_ and cert_to_id_. | 55 // Remove the specified cert from id_to_cert_ and cert_to_id_. |
(...skipping 19 matching lines...) Expand all Loading... |
75 int next_cert_id_; | 75 int next_cert_id_; |
76 | 76 |
77 // This lock protects: process_to_ids_, id_to_processes_, id_to_cert_ and | 77 // This lock protects: process_to_ids_, id_to_processes_, id_to_cert_ and |
78 // cert_to_id_. | 78 // cert_to_id_. |
79 base::Lock cert_lock_; | 79 base::Lock cert_lock_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(CertStore); | 81 DISALLOW_COPY_AND_ASSIGN(CertStore); |
82 }; | 82 }; |
83 | 83 |
84 #endif // CONTENT_BROWSER_CERT_STORE_H_ | 84 #endif // CONTENT_BROWSER_CERT_STORE_H_ |
OLD | NEW |