| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ | 5 #ifndef CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ |
| 6 #define CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ | 6 #define CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // closed to decide which certificates to keep. | 21 // closed to decide which certificates to keep. |
| 22 class SQLiteServerBoundCertStore | 22 class SQLiteServerBoundCertStore |
| 23 : public net::DefaultServerBoundCertStore::PersistentStore { | 23 : public net::DefaultServerBoundCertStore::PersistentStore { |
| 24 public: | 24 public: |
| 25 // If non-NULL, SQLiteServerBoundCertStore will keep a scoped_refptr to the | 25 // If non-NULL, SQLiteServerBoundCertStore will keep a scoped_refptr to the |
| 26 // |clear_on_exit_policy| throughout its lifetime. | 26 // |clear_on_exit_policy| throughout its lifetime. |
| 27 SQLiteServerBoundCertStore(const FilePath& path, | 27 SQLiteServerBoundCertStore(const FilePath& path, |
| 28 ClearOnExitPolicy* clear_on_exit_policy); | 28 ClearOnExitPolicy* clear_on_exit_policy); |
| 29 | 29 |
| 30 // net::DefaultServerBoundCertStore::PersistentStore: | 30 // net::DefaultServerBoundCertStore::PersistentStore: |
| 31 virtual bool Load( | 31 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; |
| 32 std::vector<net::DefaultServerBoundCertStore::ServerBoundCert*>* certs) | |
| 33 OVERRIDE; | |
| 34 virtual void AddServerBoundCert( | 32 virtual void AddServerBoundCert( |
| 35 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; | 33 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; |
| 36 virtual void DeleteServerBoundCert( | 34 virtual void DeleteServerBoundCert( |
| 37 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; | 35 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; |
| 38 virtual void SetForceKeepSessionState() OVERRIDE; | 36 virtual void SetForceKeepSessionState() OVERRIDE; |
| 39 virtual void Flush(const base::Closure& completion_task) OVERRIDE; | 37 virtual void Flush(const base::Closure& completion_task) OVERRIDE; |
| 40 | 38 |
| 41 protected: | 39 protected: |
| 42 virtual ~SQLiteServerBoundCertStore(); | 40 virtual ~SQLiteServerBoundCertStore(); |
| 43 | 41 |
| 44 private: | 42 private: |
| 45 class Backend; | 43 class Backend; |
| 46 | 44 |
| 47 scoped_refptr<Backend> backend_; | 45 scoped_refptr<Backend> backend_; |
| 48 | 46 |
| 49 DISALLOW_COPY_AND_ASSIGN(SQLiteServerBoundCertStore); | 47 DISALLOW_COPY_AND_ASSIGN(SQLiteServerBoundCertStore); |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 #endif // CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ | 50 #endif // CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ |
| OLD | NEW |