| 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 17 matching lines...) Expand all Loading... |
| 28 class QuotaManager; | 28 class QuotaManager; |
| 29 } | 29 } |
| 30 | 30 |
| 31 namespace webkit_database { | 31 namespace webkit_database { |
| 32 class DatabaseTracker; | 32 class DatabaseTracker; |
| 33 } | 33 } |
| 34 | 34 |
| 35 namespace content { | 35 namespace content { |
| 36 | 36 |
| 37 class BrowserContext; | 37 class BrowserContext; |
| 38 class CookieStoreMap; |
| 39 class DOMStorageContext; |
| 38 class IndexedDBContext; | 40 class IndexedDBContext; |
| 39 class DOMStorageContext; | |
| 40 | 41 |
| 41 // Defines what persistent state a child process can access. | 42 // Defines what persistent state a child process can access. |
| 42 // | 43 // |
| 43 // The StoragePartition defines the view each child process has of the | 44 // The StoragePartition defines the view each child process has of the |
| 44 // persistent state inside the BrowserContext. This is used to implement | 45 // persistent state inside the BrowserContext. This is used to implement |
| 45 // isolated storage where a renderer with isolated storage cannot see | 46 // isolated storage where a renderer with isolated storage cannot see |
| 46 // the cookies, localStorage, etc., that normal web renderers have access to. | 47 // the cookies, localStorage, etc., that normal web renderers have access to. |
| 47 class StoragePartition { | 48 class StoragePartition { |
| 48 public: | 49 public: |
| 49 virtual base::FilePath GetPath() = 0; | 50 virtual base::FilePath GetPath() = 0; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 79 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2, | 80 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2, |
| 80 | 81 |
| 81 QUOTA_MANAGED_STORAGE_MASK_ALL = -1 | 82 QUOTA_MANAGED_STORAGE_MASK_ALL = -1 |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 // Starts an asynchronous task that does a best-effort clear the data | 85 // Starts an asynchronous task that does a best-effort clear the data |
| 85 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| | 86 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| |
| 86 // inside this StoragePartition for the given |storage_origin|. | 87 // inside this StoragePartition for the given |storage_origin|. |
| 87 // Note session dom storage is not cleared even if you specify | 88 // Note session dom storage is not cleared even if you specify |
| 88 // REMOVE_DATA_MASK_LOCAL_STORAGE. | 89 // REMOVE_DATA_MASK_LOCAL_STORAGE. |
| 89 // | |
| 90 // TODO(ajwong): Right now, the embedder may have some | |
| 91 // URLRequestContextGetter objects that the StoragePartition does not know | |
| 92 // about. This will no longer be the case when we resolve | |
| 93 // http://crbug.com/159193. Remove |request_context_getter| when that bug | |
| 94 // is fixed. | |
| 95 virtual void ClearDataForOrigin(uint32 remove_mask, | 90 virtual void ClearDataForOrigin(uint32 remove_mask, |
| 96 uint32 quota_storage_remove_mask, | 91 uint32 quota_storage_remove_mask, |
| 97 const GURL& storage_origin, | 92 const GURL& storage_origin) = 0; |
| 98 net::URLRequestContextGetter* rq_context) = 0; | |
| 99 | 93 |
| 100 // Similar to ClearDataForOrigin(), but deletes all data out of the | 94 // Similar to ClearDataForOrigin(), but deletes all data out of the |
| 101 // StoragePartition rather than just the data related to this origin. | 95 // StoragePartition rather than just the data related to this origin. |
| 102 virtual void ClearDataForUnboundedRange(uint32 remove_mask, | 96 virtual void ClearDataForUnboundedRange(uint32 remove_mask, |
| 103 uint32 quota_storage_remove_mask) = 0; | 97 uint32 quota_storage_remove_mask) = 0; |
| 104 | 98 |
| 105 // Similar to ClearDataForOrigin(), but deletes all the data out of the | 99 // Similar to ClearDataForOrigin(), but deletes all the data out of the |
| 106 // StoragePartion from between the given |begin| and |end| dates rather | 100 // StoragePartion from between the given |begin| and |end| dates rather |
| 107 // then just the data related to this origin. | 101 // then just the data related to this origin. |
| 108 virtual void ClearDataForRange(uint32 remove_mask, | 102 virtual void ClearDataForRange(uint32 remove_mask, |
| 109 uint32 quota_storage_remove_mask, | 103 uint32 quota_storage_remove_mask, |
| 110 const base::Time& begin, | 104 const base::Time& begin, |
| 111 const base::Time& end, | 105 const base::Time& end, |
| 112 const base::Closure& callback) = 0; | 106 const base::Closure& callback) = 0; |
| 113 | 107 |
| 114 protected: | 108 protected: |
| 115 virtual ~StoragePartition() {} | 109 virtual ~StoragePartition() {} |
| 116 }; | 110 }; |
| 117 | 111 |
| 118 } // namespace content | 112 } // namespace content |
| 119 | 113 |
| 120 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 114 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
| OLD | NEW |