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_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ | 5 #ifndef NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ |
6 #define NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ | 6 #define NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 // DefaultChannelIDStore::PersistentCertStore. | 29 // DefaultChannelIDStore::PersistentCertStore. |
30 class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore { | 30 class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore { |
31 public: | 31 public: |
32 // Create or open persistent store in file |path|. All I/O tasks are performed | 32 // Create or open persistent store in file |path|. All I/O tasks are performed |
33 // in background using |background_task_runner|. | 33 // in background using |background_task_runner|. |
34 SQLiteChannelIDStore( | 34 SQLiteChannelIDStore( |
35 const base::FilePath& path, | 35 const base::FilePath& path, |
36 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner); | 36 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner); |
37 | 37 |
38 // DefaultChannelIDStore::PersistentStore: | 38 // DefaultChannelIDStore::PersistentStore: |
39 virtual void Load(const LoadedCallback& loaded_callback) override; | 39 void Load(const LoadedCallback& loaded_callback) override; |
40 virtual void AddChannelID( | 40 void AddChannelID( |
41 const DefaultChannelIDStore::ChannelID& channel_id) override; | 41 const DefaultChannelIDStore::ChannelID& channel_id) override; |
42 virtual void DeleteChannelID( | 42 void DeleteChannelID( |
43 const DefaultChannelIDStore::ChannelID& channel_id) override; | 43 const DefaultChannelIDStore::ChannelID& channel_id) override; |
44 virtual void SetForceKeepSessionState() override; | 44 void SetForceKeepSessionState() override; |
45 | 45 |
46 // Delete channel ids from servers in |server_identifiers|. | 46 // Delete channel ids from servers in |server_identifiers|. |
47 void DeleteAllInList(const std::list<std::string>& server_identifiers); | 47 void DeleteAllInList(const std::list<std::string>& server_identifiers); |
48 | 48 |
49 private: | 49 private: |
50 virtual ~SQLiteChannelIDStore(); | 50 ~SQLiteChannelIDStore() override; |
51 | 51 |
52 class Backend; | 52 class Backend; |
53 | 53 |
54 scoped_refptr<Backend> backend_; | 54 scoped_refptr<Backend> backend_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore); | 56 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace net | 59 } // namespace net |
60 | 60 |
61 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ | 61 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ |
OLD | NEW |