Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: net/extras/sqlite/sqlite_channel_id_store.h

Issue 381073002: Move sqlite_channel_id_store from chrome/browser/net to net/extras. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implemented QuotaPolicyChannelIDStore, added unit tests. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_NET_SQLITE_CHANNEL_ID_STORE_H_ 5 #ifndef NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_
6 #define CHROME_BROWSER_NET_SQLITE_CHANNEL_ID_STORE_H_ 6 #define NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
11 #include "net/ssl/default_channel_id_store.h" 12 #include "net/ssl/default_channel_id_store.h"
12 13
13 namespace base { 14 namespace base {
14 class FilePath; 15 class FilePath;
15 class SequencedTaskRunner; 16 class SequencedTaskRunner;
16 } 17 }
17 18
18 namespace quota { 19 class GURL;
19 class SpecialStoragePolicy;
20 }
21 20
22 // Implements the net::DefaultChannelIDStore::PersistentStore interface 21 namespace net {
22
23 // Implements the DefaultChannelIDStore::PersistentStore interface
23 // in terms of a SQLite database. For documentation about the actual member 24 // in terms of a SQLite database. For documentation about the actual member
24 // functions consult the documentation of the parent class 25 // functions consult the documentation of the parent class
25 // |net::DefaultChannelIDStore::PersistentCertStore|. 26 // |DefaultChannelIDStore::PersistentCertStore|.
Ryan Sleevi 2014/08/06 22:39:58 STYLE: We don't use || around class names.
mef 2014/08/07 17:40:58 Done.
26 // If provided, a |SpecialStoragePolicy| is consulted when the SQLite database 27 class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore {
27 // is closed to decide which certificates to keep.
28 class SQLiteChannelIDStore
29 : public net::DefaultChannelIDStore::PersistentStore {
30 public: 28 public:
31 SQLiteChannelIDStore( 29 SQLiteChannelIDStore(
32 const base::FilePath& path, 30 const base::FilePath& path,
33 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, 31 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner);
Ryan Sleevi 2014/08/06 22:39:58 Can/should document these - this isn't part of the
mef 2014/08/07 17:40:59 Done.
34 quota::SpecialStoragePolicy* special_storage_policy);
35 32
36 // net::DefaultChannelIDStore::PersistentStore: 33 // DefaultChannelIDStore::PersistentStore:
37 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; 34 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE;
38 virtual void AddChannelID( 35 virtual void AddChannelID(
39 const net::DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE; 36 const DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE;
40 virtual void DeleteChannelID( 37 virtual void DeleteChannelID(
41 const net::DefaultChannelIDStore::ChannelID& channel_idx) OVERRIDE; 38 const DefaultChannelIDStore::ChannelID& channel_idx) OVERRIDE;
42 virtual void SetForceKeepSessionState() OVERRIDE; 39 virtual void SetForceKeepSessionState() OVERRIDE;
43 40
44 protected: 41 private:
45 virtual ~SQLiteChannelIDStore(); 42 virtual ~SQLiteChannelIDStore();
46 43
47 private:
48 class Backend; 44 class Backend;
49 45
50 scoped_refptr<Backend> backend_; 46 scoped_refptr<Backend> backend_;
51 47
52 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore); 48 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore);
53 }; 49 };
54 50
55 #endif // CHROME_BROWSER_NET_SQLITE_CHANNEL_ID_STORE_H_ 51 } // namespace net
52
53 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698