Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / net / extras / sqlite / sqlite_channel_id_store.h
blobfc85458c43eb8d0641ca93ad37b4d3ded0c4b64f
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
3 // found in the LICENSE file.
5 #ifndef NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_
6 #define NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_
8 #include <list>
9 #include <string>
11 #include "base/callback_forward.h"
12 #include "base/compiler_specific.h"
13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h"
15 #include "net/ssl/default_channel_id_store.h"
17 namespace base {
18 class FilePath;
19 class SequencedTaskRunner;
22 class GURL;
24 namespace net {
26 // Implements the DefaultChannelIDStore::PersistentStore interface
27 // in terms of a SQLite database. For documentation about the actual member
28 // functions consult the documentation of the parent class
29 // DefaultChannelIDStore::PersistentCertStore.
30 class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore {
31 public:
32 // Create or open persistent store in file |path|. All I/O tasks are performed
33 // in background using |background_task_runner|.
34 SQLiteChannelIDStore(
35 const base::FilePath& path,
36 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner);
38 // DefaultChannelIDStore::PersistentStore:
39 void Load(const LoadedCallback& loaded_callback) override;
40 void AddChannelID(
41 const DefaultChannelIDStore::ChannelID& channel_id) override;
42 void DeleteChannelID(
43 const DefaultChannelIDStore::ChannelID& channel_id) override;
44 void SetForceKeepSessionState() override;
46 // Delete channel ids from servers in |server_identifiers|.
47 void DeleteAllInList(const std::list<std::string>& server_identifiers);
49 private:
50 ~SQLiteChannelIDStore() override;
52 class Backend;
54 scoped_refptr<Backend> backend_;
56 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore);
59 } // namespace net
61 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_