| 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 NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ | 5 #ifndef NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ |
| 6 #define NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ | 6 #define NET_BASE_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // WARNING: THE CALLBACK WILL RUN ON A RANDOM THREAD. IT MUST BE THREAD SAFE. | 50 // WARNING: THE CALLBACK WILL RUN ON A RANDOM THREAD. IT MUST BE THREAD SAFE. |
| 51 // It may be posted to the current thread, or it may run on the thread that | 51 // It may be posted to the current thread, or it may run on the thread that |
| 52 // actually does the flushing. Your Task should generally post a notification | 52 // actually does the flushing. Your Task should generally post a notification |
| 53 // to the thread you actually want to be notified on. | 53 // to the thread you actually want to be notified on. |
| 54 void FlushStore(const base::Closure& completion_task); | 54 void FlushStore(const base::Closure& completion_task); |
| 55 | 55 |
| 56 // OriginBoundCertStore implementation. | 56 // OriginBoundCertStore implementation. |
| 57 virtual bool GetOriginBoundCert( | 57 virtual bool GetOriginBoundCert( |
| 58 const std::string& origin, | 58 const std::string& origin, |
| 59 SSLClientCertType* type, | 59 SSLClientCertType* type, |
| 60 base::Time* not_valid_after, |
| 60 std::string* private_key_result, | 61 std::string* private_key_result, |
| 61 std::string* cert_result) OVERRIDE; | 62 std::string* cert_result) OVERRIDE; |
| 62 virtual void SetOriginBoundCert( | 63 virtual void SetOriginBoundCert( |
| 63 const std::string& origin, | 64 const std::string& origin, |
| 64 SSLClientCertType type, | 65 SSLClientCertType type, |
| 66 base::Time not_valid_after, |
| 65 const std::string& private_key, | 67 const std::string& private_key, |
| 66 const std::string& cert) OVERRIDE; | 68 const std::string& cert) OVERRIDE; |
| 67 virtual void DeleteOriginBoundCert(const std::string& origin) OVERRIDE; | 69 virtual void DeleteOriginBoundCert(const std::string& origin) OVERRIDE; |
| 68 virtual void DeleteAll() OVERRIDE; | 70 virtual void DeleteAll() OVERRIDE; |
| 69 virtual void GetAllOriginBoundCerts( | 71 virtual void GetAllOriginBoundCerts( |
| 70 std::vector<OriginBoundCert>* origin_bound_certs) OVERRIDE; | 72 std::vector<OriginBoundCert>* origin_bound_certs) OVERRIDE; |
| 71 virtual int GetCertCount() OVERRIDE; | 73 virtual int GetCertCount() OVERRIDE; |
| 72 | 74 |
| 73 private: | 75 private: |
| 74 static const size_t kMaxCerts; | 76 static const size_t kMaxCerts; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 protected: | 146 protected: |
| 145 PersistentStore(); | 147 PersistentStore(); |
| 146 | 148 |
| 147 private: | 149 private: |
| 148 DISALLOW_COPY_AND_ASSIGN(PersistentStore); | 150 DISALLOW_COPY_AND_ASSIGN(PersistentStore); |
| 149 }; | 151 }; |
| 150 | 152 |
| 151 } // namespace net | 153 } // namespace net |
| 152 | 154 |
| 153 #endif // NET_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ | 155 #endif // NET_DEFAULT_ORIGIN_BOUND_CERT_STORE_H_ |
| OLD | NEW |