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_DEFAULT_CHANNEL_ID_STORE_H_ | 5 #ifndef NET_SSL_DEFAULT_CHANNEL_ID_STORE_H_ |
6 #define NET_SSL_DEFAULT_CHANNEL_ID_STORE_H_ | 6 #define NET_SSL_DEFAULT_CHANNEL_ID_STORE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 23 matching lines...) Expand all Loading... |
34 // corresponding server. | 34 // corresponding server. |
35 typedef std::map<std::string, ChannelID*> ChannelIDMap; | 35 typedef std::map<std::string, ChannelID*> ChannelIDMap; |
36 | 36 |
37 // The store passed in should not have had Init() called on it yet. This | 37 // The store passed in should not have had Init() called on it yet. This |
38 // class will take care of initializing it. The backing store is NOT owned by | 38 // class will take care of initializing it. The backing store is NOT owned by |
39 // this class, but it must remain valid for the duration of the | 39 // this class, but it must remain valid for the duration of the |
40 // DefaultChannelIDStore's existence. If |store| is NULL, then no | 40 // DefaultChannelIDStore's existence. If |store| is NULL, then no |
41 // backing store will be updated. | 41 // backing store will be updated. |
42 explicit DefaultChannelIDStore(PersistentStore* store); | 42 explicit DefaultChannelIDStore(PersistentStore* store); |
43 | 43 |
44 virtual ~DefaultChannelIDStore(); | 44 ~DefaultChannelIDStore() override; |
45 | 45 |
46 // ChannelIDStore implementation. | 46 // ChannelIDStore implementation. |
47 virtual int GetChannelID( | 47 int GetChannelID(const std::string& server_identifier, |
48 const std::string& server_identifier, | 48 base::Time* expiration_time, |
49 base::Time* expiration_time, | 49 std::string* private_key_result, |
50 std::string* private_key_result, | 50 std::string* cert_result, |
51 std::string* cert_result, | 51 const GetChannelIDCallback& callback) override; |
52 const GetChannelIDCallback& callback) override; | 52 void SetChannelID(const std::string& server_identifier, |
53 virtual void SetChannelID( | 53 base::Time creation_time, |
54 const std::string& server_identifier, | 54 base::Time expiration_time, |
55 base::Time creation_time, | 55 const std::string& private_key, |
56 base::Time expiration_time, | 56 const std::string& cert) override; |
57 const std::string& private_key, | 57 void DeleteChannelID(const std::string& server_identifier, |
58 const std::string& cert) override; | 58 const base::Closure& callback) override; |
59 virtual void DeleteChannelID( | 59 void DeleteAllCreatedBetween(base::Time delete_begin, |
60 const std::string& server_identifier, | 60 base::Time delete_end, |
61 const base::Closure& callback) override; | 61 const base::Closure& callback) override; |
62 virtual void DeleteAllCreatedBetween( | 62 void DeleteAll(const base::Closure& callback) override; |
63 base::Time delete_begin, | 63 void GetAllChannelIDs(const GetChannelIDListCallback& callback) override; |
64 base::Time delete_end, | 64 int GetChannelIDCount() override; |
65 const base::Closure& callback) override; | 65 void SetForceKeepSessionState() override; |
66 virtual void DeleteAll(const base::Closure& callback) override; | |
67 virtual void GetAllChannelIDs( | |
68 const GetChannelIDListCallback& callback) override; | |
69 virtual int GetChannelIDCount() override; | |
70 virtual void SetForceKeepSessionState() override; | |
71 | 66 |
72 private: | 67 private: |
73 class Task; | 68 class Task; |
74 class GetChannelIDTask; | 69 class GetChannelIDTask; |
75 class SetChannelIDTask; | 70 class SetChannelIDTask; |
76 class DeleteChannelIDTask; | 71 class DeleteChannelIDTask; |
77 class DeleteAllCreatedBetweenTask; | 72 class DeleteAllCreatedBetweenTask; |
78 class GetAllChannelIDsTask; | 73 class GetAllChannelIDsTask; |
79 | 74 |
80 // Deletes all of the certs. Does not delete them from |store_|. | 75 // Deletes all of the certs. Does not delete them from |store_|. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 PersistentStore(); | 178 PersistentStore(); |
184 virtual ~PersistentStore(); | 179 virtual ~PersistentStore(); |
185 | 180 |
186 private: | 181 private: |
187 DISALLOW_COPY_AND_ASSIGN(PersistentStore); | 182 DISALLOW_COPY_AND_ASSIGN(PersistentStore); |
188 }; | 183 }; |
189 | 184 |
190 } // namespace net | 185 } // namespace net |
191 | 186 |
192 #endif // NET_SSL_DEFAULT_CHANNEL_ID_STORE_H_ | 187 #endif // NET_SSL_DEFAULT_CHANNEL_ID_STORE_H_ |
OLD | NEW |