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_
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"
19 class SequencedTaskRunner
;
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
{
32 // Create or open persistent store in file |path|. All I/O tasks are performed
33 // in background using |background_task_runner|.
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
;
41 const DefaultChannelIDStore::ChannelID
& channel_id
) override
;
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
);
50 ~SQLiteChannelIDStore() override
;
54 scoped_refptr
<Backend
> backend_
;
56 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore
);
61 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_