| 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" |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 | 15 |
| 16 class GURL; | 16 class GURL; |
| 17 class PrefService; |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 class Time; | 20 class Time; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace fileapi { | 23 namespace fileapi { |
| 23 class FileSystemContext; | 24 class FileSystemContext; |
| 24 } | 25 } |
| 25 | 26 |
| 26 namespace net { | 27 namespace net { |
| 27 class URLRequestContextGetter; | 28 class URLRequestContextGetter; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace quota { | 31 namespace quota { |
| 31 class QuotaManager; | 32 class QuotaManager; |
| 32 class SpecialStoragePolicy; | 33 class SpecialStoragePolicy; |
| 33 } | 34 } |
| 34 | 35 |
| 35 namespace webkit_database { | 36 namespace webkit_database { |
| 36 class DatabaseTracker; | 37 class DatabaseTracker; |
| 37 } | 38 } |
| 38 | 39 |
| 39 namespace content { | 40 namespace content { |
| 40 | 41 |
| 41 class AppCacheService; | 42 class AppCacheService; |
| 42 class BrowserContext; | 43 class BrowserContext; |
| 43 class IndexedDBContext; | 44 class IndexedDBContext; |
| 44 class DOMStorageContext; | 45 class DOMStorageContext; |
| 45 class ServiceWorkerContext; | 46 class ServiceWorkerContext; |
| 47 class HostZoomMap; |
| 46 | 48 |
| 47 // Defines what persistent state a child process can access. | 49 // Defines what persistent state a child process can access. |
| 48 // | 50 // |
| 49 // The StoragePartition defines the view each child process has of the | 51 // The StoragePartition defines the view each child process has of the |
| 50 // persistent state inside the BrowserContext. This is used to implement | 52 // persistent state inside the BrowserContext. This is used to implement |
| 51 // isolated storage where a renderer with isolated storage cannot see | 53 // isolated storage where a renderer with isolated storage cannot see |
| 52 // the cookies, localStorage, etc., that normal web renderers have access to. | 54 // the cookies, localStorage, etc., that normal web renderers have access to. |
| 53 class CONTENT_EXPORT StoragePartition { | 55 class CONTENT_EXPORT StoragePartition { |
| 54 public: | 56 public: |
| 55 virtual base::FilePath GetPath() = 0; | 57 virtual base::FilePath GetPath() = 0; |
| 56 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; | 58 virtual net::URLRequestContextGetter* GetURLRequestContext() = 0; |
| 57 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; | 59 virtual net::URLRequestContextGetter* GetMediaURLRequestContext() = 0; |
| 58 virtual quota::QuotaManager* GetQuotaManager() = 0; | 60 virtual quota::QuotaManager* GetQuotaManager() = 0; |
| 59 virtual AppCacheService* GetAppCacheService() = 0; | 61 virtual AppCacheService* GetAppCacheService() = 0; |
| 60 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; | 62 virtual fileapi::FileSystemContext* GetFileSystemContext() = 0; |
| 61 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; | 63 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() = 0; |
| 62 virtual DOMStorageContext* GetDOMStorageContext() = 0; | 64 virtual DOMStorageContext* GetDOMStorageContext() = 0; |
| 63 virtual IndexedDBContext* GetIndexedDBContext() = 0; | 65 virtual IndexedDBContext* GetIndexedDBContext() = 0; |
| 64 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; | 66 virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; |
| 67 virtual HostZoomMap* GetHostZoomMap() = 0; |
| 68 // Exposed for tests. |
| 69 virtual PrefService* GetZoomLevelPrefs() = 0; |
| 65 | 70 |
| 66 static const uint32 REMOVE_DATA_MASK_APPCACHE = 1 << 0; | 71 static const uint32 REMOVE_DATA_MASK_APPCACHE = 1 << 0; |
| 67 static const uint32 REMOVE_DATA_MASK_COOKIES = 1 << 1; | 72 static const uint32 REMOVE_DATA_MASK_COOKIES = 1 << 1; |
| 68 static const uint32 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2; | 73 static const uint32 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2; |
| 69 static const uint32 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3; | 74 static const uint32 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3; |
| 70 static const uint32 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4; | 75 static const uint32 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4; |
| 71 static const uint32 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5; | 76 static const uint32 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5; |
| 72 static const uint32 REMOVE_DATA_MASK_WEBSQL = 1 << 6; | 77 static const uint32 REMOVE_DATA_MASK_WEBSQL = 1 << 6; |
| 73 static const uint32 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7; | 78 static const uint32 REMOVE_DATA_MASK_WEBRTC_IDENTITY = 1 << 7; |
| 74 static const uint32 REMOVE_DATA_MASK_ALL = 0xFFFFFFFF; | 79 static const uint32 REMOVE_DATA_MASK_ALL = 0xFFFFFFFF; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 const base::Time end, | 126 const base::Time end, |
| 122 const base::Closure& callback) = 0; | 127 const base::Closure& callback) = 0; |
| 123 | 128 |
| 124 protected: | 129 protected: |
| 125 virtual ~StoragePartition() {} | 130 virtual ~StoragePartition() {} |
| 126 }; | 131 }; |
| 127 | 132 |
| 128 } // namespace content | 133 } // namespace content |
| 129 | 134 |
| 130 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 135 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| OLD | NEW |