| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // TransportSecurityState maintains an in memory database containing the | 5 // TransportSecurityState maintains an in memory database containing the |
| 6 // list of hosts that currently have transport security enabled. This | 6 // list of hosts that currently have transport security enabled. This |
| 7 // singleton object deals with writing that data out to disk as needed and | 7 // singleton object deals with writing that data out to disk as needed and |
| 8 // loading it at startup. | 8 // loading it at startup. |
| 9 | 9 |
| 10 // At startup we need to load the transport security state from the | 10 // At startup we need to load the transport security state from the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // | 28 // |
| 29 // TransportSecurityPersister::SerialiseState | 29 // TransportSecurityPersister::SerialiseState |
| 30 // copies the current state of the TransportSecurityState, serialises | 30 // copies the current state of the TransportSecurityState, serialises |
| 31 // and writes to disk. | 31 // and writes to disk. |
| 32 | 32 |
| 33 #ifndef CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ | 33 #ifndef CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ |
| 34 #define CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ | 34 #define CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ |
| 35 #pragma once | 35 #pragma once |
| 36 | 36 |
| 37 #include "base/file_path.h" | 37 #include "base/file_path.h" |
| 38 #include "base/lock.h" | |
| 39 #include "base/ref_counted.h" | 38 #include "base/ref_counted.h" |
| 40 #include "base/task.h" | 39 #include "base/task.h" |
| 41 #include "net/base/transport_security_state.h" | 40 #include "net/base/transport_security_state.h" |
| 42 | 41 |
| 43 class TransportSecurityPersister | 42 class TransportSecurityPersister |
| 44 : public base::RefCountedThreadSafe<TransportSecurityPersister>, | 43 : public base::RefCountedThreadSafe<TransportSecurityPersister>, |
| 45 public net::TransportSecurityState::Delegate { | 44 public net::TransportSecurityState::Delegate { |
| 46 public: | 45 public: |
| 47 TransportSecurityPersister(); | 46 TransportSecurityPersister(); |
| 48 void Initialize(net::TransportSecurityState* state, | 47 void Initialize(net::TransportSecurityState* state, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 66 ScopedRunnableMethodFactory<TransportSecurityPersister> save_coalescer_; | 65 ScopedRunnableMethodFactory<TransportSecurityPersister> save_coalescer_; |
| 67 | 66 |
| 68 scoped_refptr<net::TransportSecurityState> | 67 scoped_refptr<net::TransportSecurityState> |
| 69 transport_security_state_; // IO thread only. | 68 transport_security_state_; // IO thread only. |
| 70 | 69 |
| 71 // The path to the file in which we store the serialised state. | 70 // The path to the file in which we store the serialised state. |
| 72 FilePath state_file_; | 71 FilePath state_file_; |
| 73 }; | 72 }; |
| 74 | 73 |
| 75 #endif // CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ | 74 #endif // CHROME_BROWSER_TRANSPORT_SECURITY_PERSISTER_H_ |
| OLD | NEW |