| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // NotificationObserver implementation. | 44 // NotificationObserver implementation. |
| 45 virtual void Observe(NotificationType type, | 45 virtual void Observe(NotificationType 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 ~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_. |
| 56 // NOTE: the caller (RemoveCertsForRenderProcesHost) must hold cert_lock_. | 56 // NOTE: the caller (RemoveCertsForRenderProcesHost) must hold cert_lock_. |
| 57 void RemoveCertInternal(int cert_id); | 57 void RemoveCertInternal(int cert_id); |
| 58 | 58 |
| 59 // Removes all the certs associated with the specified process from the store. | 59 // Removes all the certs associated with the specified process from the store. |
| 60 void RemoveCertsForRenderProcesHost(int render_process_host_id); | 60 void RemoveCertsForRenderProcesHost(int render_process_host_id); |
| 61 | 61 |
| 62 typedef std::multimap<int, int> IDMap; | 62 typedef std::multimap<int, int> IDMap; |
| 63 typedef std::map<int, scoped_refptr<net::X509Certificate> > CertMap; | 63 typedef std::map<int, scoped_refptr<net::X509Certificate> > CertMap; |
| (...skipping 11 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 |