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

Side by Side Diff: content/browser/net/quota_policy_server_bound_cert_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: Added content/browser/net/quota_policyserver_bound_cert_store... Created 6 years, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_SERVER_BOUND_CERT_STORE_H_ 5 #ifndef CONTENT_BROWSER_NET_QUOTA_POLICY_SERVER_BOUND_CERT_STORE_H_
6 #define CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ 6 #define CONTENT_BROWSER_NET_QUOTA_POLICY_SERVER_BOUND_CERT_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_server_bound_cert_store.h" 11 #include "net/ssl/default_server_bound_cert_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 namespace quota {
19 class SpecialStoragePolicy; 19 class SpecialStoragePolicy;
20 } 20 }
21 21
22 // Implements the net::DefaultServerBoundCertStore::PersistentStore interface 22 namespace content {
23 // in terms of a SQLite database. For documentation about the actual member 23
24 // functions consult the documentation of the parent class 24 class QuotaPolicyServerBoundCertStore
Ryan Sleevi 2014/07/24 23:47:33 Add comments about what makes this special (i.e. D
mef 2014/07/30 22:12:05 Done.
25 // |net::DefaultServerBoundCertStore::PersistentCertStore|.
26 // If provided, a |SpecialStoragePolicy| is consulted when the SQLite database
27 // is closed to decide which certificates to keep.
28 class SQLiteServerBoundCertStore
29 : public net::DefaultServerBoundCertStore::PersistentStore { 25 : public net::DefaultServerBoundCertStore::PersistentStore {
30 public: 26 public:
31 SQLiteServerBoundCertStore( 27 QuotaPolicyServerBoundCertStore(
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); 30 quota::SpecialStoragePolicy* special_storage_policy);
35 31
36 // net::DefaultServerBoundCertStore::PersistentStore: 32 // net::DefaultServerBoundCertStore::PersistentStore:
37 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; 33 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE;
38 virtual void AddServerBoundCert( 34 virtual void AddServerBoundCert(
39 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; 35 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE;
40 virtual void DeleteServerBoundCert( 36 virtual void DeleteServerBoundCert(
41 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE; 37 const net::DefaultServerBoundCertStore::ServerBoundCert& cert) OVERRIDE;
42 virtual void SetForceKeepSessionState() OVERRIDE; 38 virtual void SetForceKeepSessionState() OVERRIDE;
43 39
44 protected: 40 protected:
45 virtual ~SQLiteServerBoundCertStore(); 41 virtual ~QuotaPolicyServerBoundCertStore();
46 42
47 private: 43 private:
48 class Backend; 44 bool IsStorageSessionOnly(
45 const net::DefaultServerBoundCertStore::ServerBoundCert& cert);
46 // True if everything should go to persistent store.
Ryan Sleevi 2014/07/24 23:47:32 Newline before the member vars.
mef 2014/07/30 22:12:05 Done.
47 bool force_keep_session_state_;
48 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
49 scoped_refptr<net::DefaultServerBoundCertStore::PersistentStore> persistent_;
50 scoped_refptr<net::DefaultServerBoundCertStore::PersistentStore> temporary_;
49 51
50 scoped_refptr<Backend> backend_; 52 DISALLOW_COPY_AND_ASSIGN(QuotaPolicyServerBoundCertStore);
51
52 DISALLOW_COPY_AND_ASSIGN(SQLiteServerBoundCertStore);
53 }; 53 };
54 54
55 #endif // CHROME_BROWSER_NET_SQLITE_SERVER_BOUND_CERT_STORE_H_ 55 } // namespace content
56
57 #endif // CONTENT_BROWSER_NET_QUOTA_POLICY_SERVER_BOUND_CERT_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698