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

Side by Side Diff: content/browser/storage_partition_impl.h

Issue 15969025: Generates the DTLS identity in browser process and returns it to render process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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) 2012 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 CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 5 #ifndef CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 6 #define CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/browser/appcache/chrome_appcache_service.h" 11 #include "content/browser/appcache/chrome_appcache_service.h"
12 #include "content/browser/dom_storage/dom_storage_context_impl.h" 12 #include "content/browser/dom_storage/dom_storage_context_impl.h"
13 #include "content/browser/indexed_db/indexed_db_context_impl.h" 13 #include "content/browser/indexed_db/indexed_db_context_impl.h"
14 #include "content/browser/media/dtls_identity_store.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "content/public/browser/storage_partition.h" 16 #include "content/public/browser/storage_partition.h"
16 17
17 namespace content { 18 namespace content {
18 19
19 class StoragePartitionImpl : public StoragePartition { 20 class StoragePartitionImpl : public StoragePartition {
20 public: 21 public:
21 CONTENT_EXPORT virtual ~StoragePartitionImpl(); 22 CONTENT_EXPORT virtual ~StoragePartitionImpl();
22 23
23 // StoragePartition interface. 24 // StoragePartition interface.
24 virtual base::FilePath GetPath() OVERRIDE; 25 virtual base::FilePath GetPath() OVERRIDE;
25 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; 26 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE;
26 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE; 27 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() OVERRIDE;
27 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; 28 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE;
28 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; 29 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
29 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; 30 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE;
30 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; 31 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
31 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE; 32 virtual DOMStorageContextImpl* GetDOMStorageContext() OVERRIDE;
32 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE; 33 virtual IndexedDBContextImpl* GetIndexedDBContext() OVERRIDE;
34 virtual DTLSIdentityStore* GetDTLSIdentityStore() OVERRIDE;
33 virtual void AsyncClearDataForOrigin( 35 virtual void AsyncClearDataForOrigin(
34 uint32 storage_mask, 36 uint32 storage_mask,
35 const GURL& storage_origin, 37 const GURL& storage_origin,
36 net::URLRequestContextGetter* request_context_getter) OVERRIDE; 38 net::URLRequestContextGetter* request_context_getter) OVERRIDE;
37 virtual void AsyncClearData(uint32 storage_mask) OVERRIDE; 39 virtual void AsyncClearData(uint32 storage_mask) OVERRIDE;
38 virtual void AsyncClearDataBetween( 40 virtual void AsyncClearDataBetween(
39 uint32 storage_mask, 41 uint32 storage_mask,
40 const base::Time& begin, 42 const base::Time& begin,
41 const base::Time& end, 43 const base::Time& end,
42 const base::Closure& callback) OVERRIDE; 44 const base::Closure& callback) OVERRIDE;
(...skipping 12 matching lines...) Expand all
55 bool in_memory, 57 bool in_memory,
56 const base::FilePath& profile_path); 58 const base::FilePath& profile_path);
57 59
58 CONTENT_EXPORT StoragePartitionImpl( 60 CONTENT_EXPORT StoragePartitionImpl(
59 const base::FilePath& partition_path, 61 const base::FilePath& partition_path,
60 quota::QuotaManager* quota_manager, 62 quota::QuotaManager* quota_manager,
61 ChromeAppCacheService* appcache_service, 63 ChromeAppCacheService* appcache_service,
62 fileapi::FileSystemContext* filesystem_context, 64 fileapi::FileSystemContext* filesystem_context,
63 webkit_database::DatabaseTracker* database_tracker, 65 webkit_database::DatabaseTracker* database_tracker,
64 DOMStorageContextImpl* dom_storage_context, 66 DOMStorageContextImpl* dom_storage_context,
65 IndexedDBContextImpl* indexed_db_context); 67 IndexedDBContextImpl* indexed_db_context,
68 DTLSIdentityStore* dtls_identity_store);
66 69
67 // Used by StoragePartitionImplMap. 70 // Used by StoragePartitionImplMap.
68 // 71 //
69 // TODO(ajwong): These should be taken in the constructor and in Create() but 72 // TODO(ajwong): These should be taken in the constructor and in Create() but
70 // because the URLRequestContextGetter still lives in Profile with a tangled 73 // because the URLRequestContextGetter still lives in Profile with a tangled
71 // initialization, if we try to retrieve the URLRequestContextGetter() 74 // initialization, if we try to retrieve the URLRequestContextGetter()
72 // before the default StoragePartition is created, we end up reentering the 75 // before the default StoragePartition is created, we end up reentering the
73 // construction and double-initializing. For now, we retain the legacy 76 // construction and double-initializing. For now, we retain the legacy
74 // behavior while allowing StoragePartitionImpl to expose these accessors by 77 // behavior while allowing StoragePartitionImpl to expose these accessors by
75 // letting StoragePartitionImplMap call these two private settings at the 78 // letting StoragePartitionImplMap call these two private settings at the
76 // appropriate time. These should move back into the constructor once 79 // appropriate time. These should move back into the constructor once
77 // URLRequestContextGetter's lifetime is sorted out. We should also move the 80 // URLRequestContextGetter's lifetime is sorted out. We should also move the
78 // PostCreateInitialization() out of StoragePartitionImplMap. 81 // PostCreateInitialization() out of StoragePartitionImplMap.
79 void SetURLRequestContext(net::URLRequestContextGetter* url_request_context); 82 void SetURLRequestContext(net::URLRequestContextGetter* url_request_context);
80 void SetMediaURLRequestContext( 83 void SetMediaURLRequestContext(
81 net::URLRequestContextGetter* media_url_request_context); 84 net::URLRequestContextGetter* media_url_request_context);
82 85
83 base::FilePath partition_path_; 86 base::FilePath partition_path_;
84 scoped_refptr<net::URLRequestContextGetter> url_request_context_; 87 scoped_refptr<net::URLRequestContextGetter> url_request_context_;
85 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_; 88 scoped_refptr<net::URLRequestContextGetter> media_url_request_context_;
86 scoped_refptr<quota::QuotaManager> quota_manager_; 89 scoped_refptr<quota::QuotaManager> quota_manager_;
87 scoped_refptr<ChromeAppCacheService> appcache_service_; 90 scoped_refptr<ChromeAppCacheService> appcache_service_;
88 scoped_refptr<fileapi::FileSystemContext> filesystem_context_; 91 scoped_refptr<fileapi::FileSystemContext> filesystem_context_;
89 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_; 92 scoped_refptr<webkit_database::DatabaseTracker> database_tracker_;
90 scoped_refptr<DOMStorageContextImpl> dom_storage_context_; 93 scoped_refptr<DOMStorageContextImpl> dom_storage_context_;
91 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; 94 scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
95 scoped_refptr<DTLSIdentityStore> dtls_identity_store_;
92 96
93 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); 97 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl);
94 }; 98 };
95 99
96 } // namespace content 100 } // namespace content
97 101
98 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ 102 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698