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 20 matching lines...) Expand all Loading... |
31 | 31 |
32 namespace webkit_database { | 32 namespace webkit_database { |
33 class DatabaseTracker; | 33 class DatabaseTracker; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 class BrowserContext; | 38 class BrowserContext; |
39 class IndexedDBContext; | 39 class IndexedDBContext; |
40 class DOMStorageContext; | 40 class DOMStorageContext; |
41 class ServiceWorkerContextWrapper; | 41 class ServiceWorkerContext; |
42 | 42 |
43 // Defines what persistent state a child process can access. | 43 // Defines what persistent state a child process can access. |
44 // | 44 // |
45 // The StoragePartition defines the view each child process has of the | 45 // The StoragePartition defines the view each child process has of the |
46 // persistent state inside the BrowserContext. This is used to implement | 46 // persistent state inside the BrowserContext. This is used to implement |
47 // isolated storage where a renderer with isolated storage cannot see | 47 // isolated storage where a renderer with isolated storage cannot see |
48 // the cookies, localStorage, etc., that normal web renderers have access to. | 48 // the cookies, localStorage, etc., that normal web renderers have access to. |
49 class StoragePartition { | 49 class StoragePartition { |
50 public: | 50 public: |
51 virtual base::FilePath GetPath() = 0; | 51 virtual base::FilePath GetPath() = 0; |
52 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 52 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
53 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; | 53 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; |
54 virtual quota::QuotaManager* GetQuotaManager() = 0; | 54 virtual quota::QuotaManager* GetQuotaManager() = 0; |
55 virtual appcache::AppCacheService* GetAppCacheService() = 0; | 55 virtual appcache::AppCacheService* GetAppCacheService() = 0; |
56 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; | 56 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; |
57 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; | 57 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; |
58 virtual DOMStorageContext* GetDOMStorageContext() = 0; | 58 virtual DOMStorageContext* GetDOMStorageContext() = 0; |
59 virtual IndexedDBContext* GetIndexedDBContext() = 0; | 59 virtual IndexedDBContext* GetIndexedDBContext() = 0; |
60 virtual ServiceWorkerContextWrapper* GetServiceWorkerContext() = 0; | 60 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; |
61 | 61 |
62 enum RemoveDataMask { | 62 enum RemoveDataMask { |
63 REMOVE_DATA_MASK_APPCACHE = 1 << 0, | 63 REMOVE_DATA_MASK_APPCACHE = 1 << 0, |
64 REMOVE_DATA_MASK_COOKIES = 1 << 1, | 64 REMOVE_DATA_MASK_COOKIES = 1 << 1, |
65 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, | 65 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, |
66 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, | 66 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, |
67 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, | 67 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, |
68 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, | 68 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, |
69 REMOVE_DATA_MASK_WEBSQL = 1 << 6, | 69 REMOVE_DATA_MASK_WEBSQL = 1 << 6, |
70 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7, | 70 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const base::Time end, | 121 const base::Time end, |
122 const base::Closure& callback) = 0; | 122 const base::Closure& callback) = 0; |
123 | 123 |
124 protected: | 124 protected: |
125 virtual ~StoragePartition() {} | 125 virtual ~StoragePartition() {} |
126 }; | 126 }; |
127 | 127 |
128 } // namespace content | 128 } // namespace content |
129 | 129 |
130 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 130 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
OLD | NEW |