| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 56 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| 57 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; | 57 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; |
| 58 virtual quota::QuotaManager* GetQuotaManager() = 0; | 58 virtual quota::QuotaManager* GetQuotaManager() = 0; |
| 59 virtual AppCacheService* GetAppCacheService() = 0; | 59 virtual AppCacheService* GetAppCacheService() = 0; |
| 60 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; | 60 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; |
| 61 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; | 61 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; |
| 62 virtual DOMStorageContext* GetDOMStorageContext() = 0; | 62 virtual DOMStorageContext* GetDOMStorageContext() = 0; |
| 63 virtual IndexedDBContext* GetIndexedDBContext() = 0; | 63 virtual IndexedDBContext* GetIndexedDBContext() = 0; |
| 64 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; | 64 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; |
| 65 | 65 |
| 66 static const uint32 REMOVE_DATA_MASK_APPCACHE; | 66 static const uint32 REMOVE_DATA_MASK_APPCACHE = 1 << 0; |
| 67 static const uint32 REMOVE_DATA_MASK_COOKIES; | 67 static const uint32 REMOVE_DATA_MASK_COOKIES = 1 << 1; |
| 68 static const uint32 REMOVE_DATA_MASK_FILE_SYSTEMS; | 68 static const uint32 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2; |
| 69 static const uint32 REMOVE_DATA_MASK_INDEXEDDB; | 69 static const uint32 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3; |
| 70 static const uint32 REMOVE_DATA_MASK_LOCAL_STORAGE; | 70 static const uint32 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4; |
| 71 static const uint32 REMOVE_DATA_MASK_SHADER_CACHE; | 71 static const uint32 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5; |
| 72 static const uint32 REMOVE_DATA_MASK_WEBSQL; | 72 static const uint32 REMOVE_DATA_MASK_WEBSQL = 1 << 6; |
| 73 static const uint32 REMOVE_DATA_MASK_WEBRTC_IDENTITY; | 73 static const uint32 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7; |
| 74 static const uint32 REMOVE_DATA_MASK_ALL; | 74 static const uint32 REMOVE_DATA_MASK_ALL = 0xFFFFFFFF; |
| 75 | 75 |
| 76 // Corresponds to quota::kStorageTypeTemporary. | 76 // Corresponds to quota::kStorageTypeTemporary. |
| 77 static const uint32 QUOTA_MANAGED_STORAGE_MASK_TEMPORARY; | 77 static const uint32 QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0; |
| 78 // Corresponds to quota::kStorageTypePersistent. | 78 // Corresponds to quota::kStorageTypePersistent. |
| 79 static const uint32 QUOTA_MANAGED_STORAGE_MASK_PERSISTENT; | 79 static const uint32 QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1; |
| 80 // Corresponds to quota::kStorageTypeSyncable. | 80 // Corresponds to quota::kStorageTypeSyncable. |
| 81 static const uint32 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE; | 81 static const uint32 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2; |
| 82 static const uint32 QUOTA_MANAGED_STORAGE_MASK_ALL; | 82 static const uint32 QUOTA_MANAGED_STORAGE_MASK_ALL = 0xFFFFFFFF; |
| 83 | 83 |
| 84 // Starts an asynchronous task that does a best-effort clear the data | 84 // Starts an asynchronous task that does a best-effort clear the data |
| 85 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| | 85 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| |
| 86 // inside this StoragePartition for the given |storage_origin|. | 86 // inside this StoragePartition for the given |storage_origin|. |
| 87 // Note session dom storage is not cleared even if you specify | 87 // Note session dom storage is not cleared even if you specify |
| 88 // REMOVE_DATA_MASK_LOCAL_STORAGE. | 88 // REMOVE_DATA_MASK_LOCAL_STORAGE. |
| 89 // | 89 // |
| 90 // TODO(ajwong): Right now, the embedder may have some | 90 // TODO(ajwong): Right now, the embedder may have some |
| 91 // URLRequestContextGetter objects that the StoragePartition does not know | 91 // URLRequestContextGetter objects that the StoragePartition does not know |
| 92 // about. This will no longer be the case when we resolve | 92 // about. This will no longer be the case when we resolve |
| (...skipping 25 matching lines...) Expand all Loading... |
| 118 const base::Time end, | 118 const base::Time end, |
| 119 const base::Closure& callback) = 0; | 119 const base::Closure& callback) = 0; |
| 120 | 120 |
| 121 protected: | 121 protected: |
| 122 virtual ~StoragePartition() {} | 122 virtual ~StoragePartition() {} |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace content | 125 } // namespace content |
| 126 | 126 |
| 127 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 127 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| OLD | NEW |