| 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_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class BackgroundSyncContext; | 42 class BackgroundSyncContext; |
| 43 class BrowserContext; | 43 class BrowserContext; |
| 44 class HostZoomLevelContext; | 44 class HostZoomLevelContext; |
| 45 class HostZoomMap; | 45 class HostZoomMap; |
| 46 class DOMStorageContext; | 46 class DOMStorageContext; |
| 47 class GeofencingManager; | 47 class GeofencingManager; |
| 48 class IndexedDBContext; | 48 class IndexedDBContext; |
| 49 class NavigatorConnectContext; | 49 class NavigatorConnectContext; |
| 50 class PlatformNotificationContext; | 50 class PlatformNotificationContext; |
| 51 class ServiceWorkerContext; | 51 class ServiceWorkerContext; |
| 52 class CacheStorageContext; |
| 52 class ZoomLevelDelegate; | 53 class ZoomLevelDelegate; |
| 53 | 54 |
| 54 // Defines what persistent state a child process can access. | 55 // Defines what persistent state a child process can access. |
| 55 // | 56 // |
| 56 // The StoragePartition defines the view each child process has of the | 57 // The StoragePartition defines the view each child process has of the |
| 57 // persistent state inside the BrowserContext. This is used to implement | 58 // persistent state inside the BrowserContext. This is used to implement |
| 58 // isolated storage where a renderer with isolated storage cannot see | 59 // isolated storage where a renderer with isolated storage cannot see |
| 59 // the cookies, localStorage, etc., that normal web renderers have access to. | 60 // the cookies, localStorage, etc., that normal web renderers have access to. |
| 60 class CONTENT_EXPORT StoragePartition { | 61 class CONTENT_EXPORT StoragePartition { |
| 61 public: | 62 public: |
| 62 virtual base::FilePath GetPath() = 0; | 63 virtual base::FilePath GetPath() = 0; |
| 63 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 64 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| 64 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; | 65 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; |
| 65 virtual storage::QuotaManager* GetQuotaManager() = 0; | 66 virtual storage::QuotaManager* GetQuotaManager() = 0; |
| 66 virtual AppCacheService* GetAppCacheService() = 0; | 67 virtual AppCacheService* GetAppCacheService() = 0; |
| 67 virtual storage::FileSystemContext* GetFileSystemContext() = 0; | 68 virtual storage::FileSystemContext* GetFileSystemContext() = 0; |
| 68 virtual storage::DatabaseTracker* GetDatabaseTracker() = 0; | 69 virtual storage::DatabaseTracker* GetDatabaseTracker() = 0; |
| 69 virtual DOMStorageContext* GetDOMStorageContext() = 0; | 70 virtual DOMStorageContext* GetDOMStorageContext() = 0; |
| 70 virtual IndexedDBContext* GetIndexedDBContext() = 0; | 71 virtual IndexedDBContext* GetIndexedDBContext() = 0; |
| 71 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; | 72 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; |
| 73 virtual CacheStorageContext* GetCacheStorageContext() = 0; |
| 72 virtual GeofencingManager* GetGeofencingManager() = 0; | 74 virtual GeofencingManager* GetGeofencingManager() = 0; |
| 73 virtual HostZoomMap* GetHostZoomMap() = 0; | 75 virtual HostZoomMap* GetHostZoomMap() = 0; |
| 74 virtual HostZoomLevelContext* GetHostZoomLevelContext() = 0; | 76 virtual HostZoomLevelContext* GetHostZoomLevelContext() = 0; |
| 75 virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0; | 77 virtual ZoomLevelDelegate* GetZoomLevelDelegate() = 0; |
| 76 virtual NavigatorConnectContext* GetNavigatorConnectContext() = 0; | 78 virtual NavigatorConnectContext* GetNavigatorConnectContext() = 0; |
| 77 virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0; | 79 virtual PlatformNotificationContext* GetPlatformNotificationContext() = 0; |
| 78 virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0; | 80 virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0; |
| 79 | 81 |
| 80 enum : uint32 { | 82 enum : uint32 { |
| 81 REMOVE_DATA_MASK_APPCACHE = 1 << 0, | 83 REMOVE_DATA_MASK_APPCACHE = 1 << 0, |
| 82 REMOVE_DATA_MASK_COOKIES = 1 << 1, | 84 REMOVE_DATA_MASK_COOKIES = 1 << 1, |
| 83 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, | 85 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, |
| 84 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, | 86 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, |
| 85 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, | 87 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, |
| 86 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, | 88 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, |
| 87 REMOVE_DATA_MASK_WEBSQL = 1 << 6, | 89 REMOVE_DATA_MASK_WEBSQL = 1 << 6, |
| 88 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7, | 90 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7, |
| 89 REMOVE_DATA_MASK_SERVICE_WORKERS = 1 << 8, | 91 REMOVE_DATA_MASK_SERVICE_WORKERS = 1 << 8, |
| 92 REMOVE_DATA_MASK_CACHE_STORAGE = 1 << 9, |
| 90 REMOVE_DATA_MASK_ALL = 0xFFFFFFFF, | 93 REMOVE_DATA_MASK_ALL = 0xFFFFFFFF, |
| 91 | 94 |
| 92 // Corresponds to storage::kStorageTypeTemporary. | 95 // Corresponds to storage::kStorageTypeTemporary. |
| 93 QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0, | 96 QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0, |
| 94 // Corresponds to storage::kStorageTypePersistent. | 97 // Corresponds to storage::kStorageTypePersistent. |
| 95 QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1, | 98 QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1, |
| 96 // Corresponds to storage::kStorageTypeSyncable. | 99 // Corresponds to storage::kStorageTypeSyncable. |
| 97 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2, | 100 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2, |
| 98 QUOTA_MANAGED_STORAGE_MASK_ALL = 0xFFFFFFFF, | 101 QUOTA_MANAGED_STORAGE_MASK_ALL = 0xFFFFFFFF, |
| 99 }; | 102 }; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // unwritten data has been written out to the filesystem. | 146 // unwritten data has been written out to the filesystem. |
| 144 virtual void Flush() = 0; | 147 virtual void Flush() = 0; |
| 145 | 148 |
| 146 protected: | 149 protected: |
| 147 virtual ~StoragePartition() {} | 150 virtual ~StoragePartition() {} |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace content | 153 } // namespace content |
| 151 | 154 |
| 152 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 155 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| OLD | NEW |