| 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> |
| 11 |
| 10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 12 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 13 #include "base/macros.h" | 15 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 15 #include "content/browser/appcache/chrome_appcache_service.h" | 17 #include "content/browser/appcache/chrome_appcache_service.h" |
| 16 #include "content/browser/background_sync/background_sync_context.h" | 18 #include "content/browser/background_sync/background_sync_context.h" |
| 17 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" | 19 #include "content/browser/broadcast_channel/broadcast_channel_provider.h" |
| 18 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 20 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 19 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 21 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 RemoveProtectedLocalStorageForever); | 150 RemoveProtectedLocalStorageForever); |
| 149 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, | 151 FRIEND_TEST_ALL_PREFIXES(StoragePartitionImplTest, |
| 150 RemoveLocalStorageForLastWeek); | 152 RemoveLocalStorageForLastWeek); |
| 151 | 153 |
| 152 // |relative_partition_path| is the relative path under |profile_path| to the | 154 // |relative_partition_path| is the relative path under |profile_path| to the |
| 153 // StoragePartition's on-disk-storage. | 155 // StoragePartition's on-disk-storage. |
| 154 // | 156 // |
| 155 // If |in_memory| is true, the |relative_partition_path| is (ab)used as a way | 157 // If |in_memory| is true, the |relative_partition_path| is (ab)used as a way |
| 156 // of distinguishing different in-memory partitions, but nothing is persisted | 158 // of distinguishing different in-memory partitions, but nothing is persisted |
| 157 // on to disk. | 159 // on to disk. |
| 158 static StoragePartitionImpl* Create( | 160 static std::unique_ptr<StoragePartitionImpl> Create( |
| 159 BrowserContext* context, | 161 BrowserContext* context, |
| 160 bool in_memory, | 162 bool in_memory, |
| 161 const base::FilePath& relative_partition_path); | 163 const base::FilePath& relative_partition_path); |
| 162 | 164 |
| 163 StoragePartitionImpl( | 165 StoragePartitionImpl( |
| 164 BrowserContext* browser_context, | 166 BrowserContext* browser_context, |
| 165 const base::FilePath& partition_path, | 167 const base::FilePath& partition_path, |
| 166 storage::QuotaManager* quota_manager, | 168 storage::QuotaManager* quota_manager, |
| 167 ChromeAppCacheService* appcache_service, | 169 ChromeAppCacheService* appcache_service, |
| 168 storage::FileSystemContext* filesystem_context, | 170 storage::FileSystemContext* filesystem_context, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the | 230 // StoragePartitionImplMap which then owns StoragePartitionImpl. When the |
| 229 // BrowserContext is destroyed, |this| will be destroyed too. | 231 // BrowserContext is destroyed, |this| will be destroyed too. |
| 230 BrowserContext* browser_context_; | 232 BrowserContext* browser_context_; |
| 231 | 233 |
| 232 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); | 234 DISALLOW_COPY_AND_ASSIGN(StoragePartitionImpl); |
| 233 }; | 235 }; |
| 234 | 236 |
| 235 } // namespace content | 237 } // namespace content |
| 236 | 238 |
| 237 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ | 239 #endif // CONTENT_BROWSER_STORAGE_PARTITION_IMPL_H_ |
| OLD | NEW |