OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SSL_CHANNEL_ID_STORE_H_ | 5 #ifndef NET_SSL_CHANNEL_ID_STORE_H_ |
6 #define NET_SSL_CHANNEL_ID_STORE_H_ | 6 #define NET_SSL_CHANNEL_ID_STORE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 base::Time delete_begin, | 88 base::Time delete_begin, |
89 base::Time delete_end, | 89 base::Time delete_end, |
90 const base::Closure& completion_callback) = 0; | 90 const base::Closure& completion_callback) = 0; |
91 | 91 |
92 // Removes all channel ID keypairs from the store. | 92 // Removes all channel ID keypairs from the store. |
93 virtual void DeleteAll(const base::Closure& completion_callback) = 0; | 93 virtual void DeleteAll(const base::Closure& completion_callback) = 0; |
94 | 94 |
95 // Returns all channel ID keypairs. | 95 // Returns all channel ID keypairs. |
96 virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback) = 0; | 96 virtual void GetAllChannelIDs(const GetChannelIDListCallback& callback) = 0; |
97 | 97 |
| 98 // Signals to the backing store that any pending writes should be flushed. |
| 99 virtual void Flush() = 0; |
| 100 |
98 // Helper function that adds all keypairs from |list| into this instance. | 101 // Helper function that adds all keypairs from |list| into this instance. |
99 void InitializeFrom(const ChannelIDList& list); | 102 void InitializeFrom(const ChannelIDList& list); |
100 | 103 |
101 // Returns the number of keypairs in the store. May return 0 if the backing | 104 // Returns the number of keypairs in the store. May return 0 if the backing |
102 // store is not loaded yet. | 105 // store is not loaded yet. |
103 // Public only for unit testing. | 106 // Public only for unit testing. |
104 virtual int GetChannelIDCount() = 0; | 107 virtual int GetChannelIDCount() = 0; |
105 | 108 |
106 // When invoked, instructs the store to keep session related data on | 109 // When invoked, instructs the store to keep session related data on |
107 // destruction. | 110 // destruction. |
108 virtual void SetForceKeepSessionState() = 0; | 111 virtual void SetForceKeepSessionState() = 0; |
109 | 112 |
110 // Returns true if this ChannelIDStore is ephemeral, and false if it is | 113 // Returns true if this ChannelIDStore is ephemeral, and false if it is |
111 // persistent. | 114 // persistent. |
112 virtual bool IsEphemeral() = 0; | 115 virtual bool IsEphemeral() = 0; |
113 }; | 116 }; |
114 | 117 |
115 } // namespace net | 118 } // namespace net |
116 | 119 |
117 #endif // NET_SSL_CHANNEL_ID_STORE_H_ | 120 #endif // NET_SSL_CHANNEL_ID_STORE_H_ |
OLD | NEW |