| OLD | NEW |
| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "content/browser/appcache/chrome_appcache_service.h" | 17 #include "content/browser/appcache/chrome_appcache_service.h" |
| 18 #include "content/browser/background_sync/background_sync_context.h" | 18 #include "content/browser/background_sync/background_sync_context.h" |
| 19 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 19 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 20 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 20 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 21 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 21 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 22 #include "content/browser/host_zoom_level_context.h" | 22 #include "content/browser/host_zoom_level_context.h" |
| 23 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 23 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
| 24 #include "content/browser/notifications/platform_notification_context_impl.h" | 24 #include "content/browser/notifications/platform_notification_context_impl.h" |
| 25 #include "content/browser/payments/payment_app_context.h" |
| 25 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 26 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 26 #include "content/common/content_export.h" | 27 #include "content/common/content_export.h" |
| 27 #include "content/common/storage_partition_service.mojom.h" | 28 #include "content/common/storage_partition_service.mojom.h" |
| 28 #include "content/public/browser/storage_partition.h" | 29 #include "content/public/browser/storage_partition.h" |
| 29 #include "mojo/public/cpp/bindings/binding_set.h" | 30 #include "mojo/public/cpp/bindings/binding_set.h" |
| 30 #include "net/cookies/cookie_store.h" | 31 #include "net/cookies/cookie_store.h" |
| 31 #include "storage/browser/quota/special_storage_policy.h" | 32 #include "storage/browser/quota/special_storage_policy.h" |
| 32 | 33 |
| 33 namespace content { | 34 namespace content { |
| 34 | 35 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 DOMStorageContextWrapper* GetDOMStorageContext() override; | 68 DOMStorageContextWrapper* GetDOMStorageContext() override; |
| 68 IndexedDBContextImpl* GetIndexedDBContext() override; | 69 IndexedDBContextImpl* GetIndexedDBContext() override; |
| 69 CacheStorageContextImpl* GetCacheStorageContext() override; | 70 CacheStorageContextImpl* GetCacheStorageContext() override; |
| 70 ServiceWorkerContextWrapper* GetServiceWorkerContext() override; | 71 ServiceWorkerContextWrapper* GetServiceWorkerContext() override; |
| 71 HostZoomMap* GetHostZoomMap() override; | 72 HostZoomMap* GetHostZoomMap() override; |
| 72 HostZoomLevelContext* GetHostZoomLevelContext() override; | 73 HostZoomLevelContext* GetHostZoomLevelContext() override; |
| 73 ZoomLevelDelegate* GetZoomLevelDelegate() override; | 74 ZoomLevelDelegate* GetZoomLevelDelegate() override; |
| 74 PlatformNotificationContextImpl* GetPlatformNotificationContext() override; | 75 PlatformNotificationContextImpl* GetPlatformNotificationContext() override; |
| 75 | 76 |
| 76 BackgroundSyncContext* GetBackgroundSyncContext(); | 77 BackgroundSyncContext* GetBackgroundSyncContext(); |
| 78 PaymentAppContext* GetPaymentAppContext(); |
| 77 BroadcastChannelProvider* GetBroadcastChannelProvider(); | 79 BroadcastChannelProvider* GetBroadcastChannelProvider(); |
| 78 | 80 |
| 79 // mojom::StoragePartitionService interface. | 81 // mojom::StoragePartitionService interface. |
| 80 void OpenLocalStorage( | 82 void OpenLocalStorage( |
| 81 const url::Origin& origin, | 83 const url::Origin& origin, |
| 82 mojom::LevelDBObserverPtr observer, | 84 mojom::LevelDBObserverPtr observer, |
| 83 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) override; | 85 mojo::InterfaceRequest<mojom::LevelDBWrapper> request) override; |
| 84 | 86 |
| 85 void ClearDataForOrigin(uint32_t remove_mask, | 87 void ClearDataForOrigin(uint32_t remove_mask, |
| 86 uint32_t quota_storage_remove_mask, | 88 uint32_t quota_storage_remove_mask, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 storage::FileSystemContext* filesystem_context, | 172 storage::FileSystemContext* filesystem_context, |
| 171 storage::DatabaseTracker* database_tracker, | 173 storage::DatabaseTracker* database_tracker, |
| 172 DOMStorageContextWrapper* dom_storage_context, | 174 DOMStorageContextWrapper* dom_storage_context, |
| 173 IndexedDBContextImpl* indexed_db_context, | 175 IndexedDBContextImpl* indexed_db_context, |
| 174 CacheStorageContextImpl* cache_storage_context, | 176 CacheStorageContextImpl* cache_storage_context, |
| 175 ServiceWorkerContextWrapper* service_worker_context, | 177 ServiceWorkerContextWrapper* service_worker_context, |
| 176 storage::SpecialStoragePolicy* special_storage_policy, | 178 storage::SpecialStoragePolicy* special_storage_policy, |
| 177 HostZoomLevelContext* host_zoom_level_context, | 179 HostZoomLevelContext* host_zoom_level_context, |
| 178 PlatformNotificationContextImpl* platform_notification_context, | 180 PlatformNotificationContextImpl* platform_notification_context, |
| 179 BackgroundSyncContext* background_sync_context, | 181 BackgroundSyncContext* background_sync_context, |
| 182 PaymentAppContext* payment_app_context, |
| 180 scoped_refptr<BroadcastChannelProvider>broadcast_channel_provider); | 183 scoped_refptr<BroadcastChannelProvider>broadcast_channel_provider); |
| 181 | 184 |
| 182 // We will never have both remove_origin be populated and a cookie_matcher. | 185 // We will never have both remove_origin be populated and a cookie_matcher. |
| 183 void ClearDataImpl(uint32_t remove_mask, | 186 void ClearDataImpl(uint32_t remove_mask, |
| 184 uint32_t quota_storage_remove_mask, | 187 uint32_t quota_storage_remove_mask, |
| 185 const GURL& remove_origin, | 188 const GURL& remove_origin, |
| 186 const OriginMatcherFunction& origin_matcher, | 189 const OriginMatcherFunction& origin_matcher, |
| 187 const CookieMatcherFunction& cookie_matcher, | 190 const CookieMatcherFunction& cookie_matcher, |
| 188 net::URLRequestContextGetter* rq_context, | 191 net::URLRequestContextGetter* rq_context, |
| 189 const base::Time begin, | 192 const base::Time begin, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 215 scoped_refptr<storage::FileSystemContext> filesystem_context_; | 218 scoped_refptr<storage::FileSystemContext> filesystem_context_; |
| 216 scoped_refptr<storage::DatabaseTracker> database_tracker_; | 219 scoped_refptr<storage::DatabaseTracker> database_tracker_; |
| 217 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; | 220 scoped_refptr<DOMStorageContextWrapper> dom_storage_context_; |
| 218 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; | 221 scoped_refptr<IndexedDBContextImpl> indexed_db_context_; |
| 219 scoped_refptr<CacheStorageContextImpl> cache_storage_context_; | 222 scoped_refptr<CacheStorageContextImpl> cache_storage_context_; |
| 220 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; | 223 scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; |
| 221 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | 224 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; |
| 222 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; | 225 scoped_refptr<HostZoomLevelContext> host_zoom_level_context_; |
| 223 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_; | 226 scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_; |
| 224 scoped_refptr<BackgroundSyncContext> background_sync_context_; | 227 scoped_refptr<BackgroundSyncContext> background_sync_context_; |
| 228 scoped_refptr<PaymentAppContext> payment_app_context_; |
| 225 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_; | 229 scoped_refptr<BroadcastChannelProvider> broadcast_channel_provider_; |
| 226 | 230 |
| 227 mojo::BindingSet<mojom::StoragePartitionService> bindings_; | 231 mojo::BindingSet<mojom::StoragePartitionService> bindings_; |
| 228 | 232 |
| 229 // Raw pointer that should always be valid. The BrowserContext owns the | 233 // Raw pointer that should always be valid. The BrowserContext owns the |
| 230 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | 234 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the |
| 231 // BrowserContext is destroyed, |this| will be destroyed too. | 235 // BrowserContext is destroyed, |this| will be destroyed too. |
| 232 BrowserContext* browser_context_; | 236 BrowserContext* browser_context_; |
| 233 | 237 |
| 234 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 238 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
| 235 }; | 239 }; |
| 236 | 240 |
| 237 } // namespace content | 241 } // namespace content |
| 238 | 242 |
| 239 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 243 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| OLD | NEW |