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 "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "content/browser/appcache/chrome_appcache_service.h" | 15 #include "content/browser/appcache/chrome_appcache_service.h" |
16 #include "content/browser/background_sync/background_sync_context_impl.h" | 16 #include "content/browser/background_sync/background_sync_context_impl.h" |
17 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 17 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
18 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 18 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
19 #include "content/browser/host_zoom_level_context.h" | 19 #include "content/browser/host_zoom_level_context.h" |
20 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 20 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
21 #include "content/browser/media/webrtc/webrtc_identity_store.h" | 21 #include "content/browser/media/webrtc/webrtc_identity_store.h" |
22 #include "content/browser/navigator_connect/navigator_connect_context_impl.h" | 22 #include "content/browser/navigator_connect/navigator_connect_context_impl.h" |
23 #include "content/browser/notifications/platform_notification_context_impl.h" | 23 #include "content/browser/notifications/platform_notification_context_impl.h" |
24 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 24 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
25 #include "content/common/content_export.h" | 25 #include "content/common/content_export.h" |
26 #include "content/common/storage_partition_service.mojom.h" | 26 #include "content/common/storage_partition_service.mojom.h" |
27 #include "content/public/browser/storage_partition.h" | 27 #include "content/public/browser/storage_partition.h" |
28 #include "mojo/public/cpp/bindings/binding_set.h" | 28 #include "mojo/public/cpp/bindings/binding_set.h" |
| 29 #include "net/cookies/cookie_store.h" |
29 #include "storage/browser/quota/special_storage_policy.h" | 30 #include "storage/browser/quota/special_storage_policy.h" |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 | 33 |
33 class StoragePartitionImpl : public StoragePartition, | 34 class StoragePartitionImpl : public StoragePartition, |
34 public mojom::StoragePartitionService { | 35 public mojom::StoragePartitionService { |
35 public: | 36 public: |
36 CONTENT_EXPORT ~StoragePartitionImpl() override; | 37 CONTENT_EXPORT ~StoragePartitionImpl() override; |
37 | 38 |
38 // Quota managed data uses a different bitmask for types than | 39 // Quota managed data uses a different bitmask for types than |
39 // StoragePartition uses. This method generates that mask. | 40 // StoragePartition uses. This method generates that mask. |
40 CONTENT_EXPORT static int GenerateQuotaClientMask(uint32_t remove_mask); | 41 CONTENT_EXPORT static int GenerateQuotaClientMask(uint32_t remove_mask); |
41 | 42 |
| 43 // This creates a CookiePredicate that matches all host (NOT domain) cookies |
| 44 // that match the host of |url|. This is intended to be used with |
| 45 // DeleteAllCreatedBetweenWithPredicateAsync. |
| 46 CONTENT_EXPORT static net::CookieStore::CookiePredicate |
| 47 CreatePredicateForHostCookies(const GURL& url); |
| 48 |
42 CONTENT_EXPORT void OverrideQuotaManagerForTesting( | 49 CONTENT_EXPORT void OverrideQuotaManagerForTesting( |
43 storage::QuotaManager* quota_manager); | 50 storage::QuotaManager* quota_manager); |
44 CONTENT_EXPORT void OverrideSpecialStoragePolicyForTesting( | 51 CONTENT_EXPORT void OverrideSpecialStoragePolicyForTesting( |
45 storage::SpecialStoragePolicy* special_storage_policy); | 52 storage::SpecialStoragePolicy* special_storage_policy); |
46 | 53 |
47 // StoragePartition interface. | 54 // StoragePartition interface. |
48 base::FilePath GetPath() override; | 55 base::FilePath GetPath() override; |
49 net::URLRequestContextGetter* GetURLRequestContext() override; | 56 net::URLRequestContextGetter* GetURLRequestContext() override; |
50 net::URLRequestContextGetter* GetMediaURLRequestContext() override; | 57 net::URLRequestContextGetter* GetMediaURLRequestContext() override; |
51 storage::QuotaManager* GetQuotaManager() override; | 58 storage::QuotaManager* GetQuotaManager() override; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | 219 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the |
213 // BrowserContext is destroyed, |this| will be destroyed too. | 220 // BrowserContext is destroyed, |this| will be destroyed too. |
214 BrowserContext* browser_context_; | 221 BrowserContext* browser_context_; |
215 | 222 |
216 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 223 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
217 }; | 224 }; |
218 | 225 |
219 } // namespace content | 226 } // namespace content |
220 | 227 |
221 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 228 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
OLD | NEW |