Chromium Code Reviews| 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 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/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "net/ssl/default_channel_id_store.h" | 11 #include "net/ssl/default_channel_id_store.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class FilePath; | 14 class FilePath; |
| 15 class SequencedTaskRunner; | 15 class SequencedTaskRunner; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace quota { | 18 class GURL; |
| 19 class SpecialStoragePolicy; | |
| 20 } | |
| 21 | 19 |
| 22 // Implements the net::DefaultChannelIDStore::PersistentStore interface | 20 namespace net { |
|
mmenke
2014/07/31 15:24:07
Should be a blank line after the namespace line.
mef
2014/07/31 21:12:23
Done.
| |
| 21 // Implements the DefaultChannelIDStore::PersistentStore interface | |
| 23 // in terms of a SQLite database. For documentation about the actual member | 22 // in terms of a SQLite database. For documentation about the actual member |
| 24 // functions consult the documentation of the parent class | 23 // functions consult the documentation of the parent class |
| 25 // |net::DefaultChannelIDStore::PersistentCertStore|. | 24 // |DefaultChannelIDStore::PersistentCertStore|. |
| 26 // If provided, a |SpecialStoragePolicy| is consulted when the SQLite database | 25 class SQLiteChannelIDStore : public DefaultChannelIDStore::PersistentStore { |
| 27 // is closed to decide which certificates to keep. | |
| 28 class SQLiteChannelIDStore | |
| 29 : public net::DefaultChannelIDStore::PersistentStore { | |
| 30 public: | 26 public: |
| 31 SQLiteChannelIDStore( | 27 SQLiteChannelIDStore( |
| 32 const base::FilePath& path, | 28 const base::FilePath& path, |
| 33 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, | 29 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner); |
| 34 quota::SpecialStoragePolicy* special_storage_policy); | |
| 35 | 30 |
| 36 // net::DefaultChannelIDStore::PersistentStore: | 31 // DefaultChannelIDStore::PersistentStore: |
| 37 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; | 32 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; |
| 38 virtual void AddChannelID( | 33 virtual void AddChannelID( |
| 39 const net::DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE; | 34 const DefaultChannelIDStore::ChannelID& channel_id) OVERRIDE; |
| 40 virtual void DeleteChannelID( | 35 virtual void DeleteChannelID( |
| 41 const net::DefaultChannelIDStore::ChannelID& channel_idx) OVERRIDE; | 36 const DefaultChannelIDStore::ChannelID& channel_idx) OVERRIDE; |
| 42 virtual void SetForceKeepSessionState() OVERRIDE; | 37 virtual void SetForceKeepSessionState() OVERRIDE; |
| 43 | 38 |
| 44 protected: | 39 private: |
| 45 virtual ~SQLiteChannelIDStore(); | 40 virtual ~SQLiteChannelIDStore(); |
| 46 | 41 |
| 47 private: | |
| 48 class Backend; | 42 class Backend; |
| 49 | 43 |
| 50 scoped_refptr<Backend> backend_; | 44 scoped_refptr<Backend> backend_; |
| 51 | 45 |
| 52 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore); | 46 DISALLOW_COPY_AND_ASSIGN(SQLiteChannelIDStore); |
|
mmenke
2014/07/31 15:24:07
Know this was an old bug, but should include the h
mef
2014/07/31 21:12:23
Done.
| |
| 53 }; | 47 }; |
| 54 | 48 |
| 55 #endif // CHROME_BROWSER_NET_SQLITE_CHANNEL_ID_STORE_H_ | 49 } // namespace net |
| 50 | |
| 51 #endif // NET_EXTRAS_SQLITE_SQLITE_CHANNEL_ID_STORE_H_ | |
| OLD | NEW |