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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 REMOVE_DATA_MASK_COOKIES = 1 << 1, | 61 REMOVE_DATA_MASK_COOKIES = 1 << 1, |
62 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, | 62 REMOVE_DATA_MASK_FILE_SYSTEMS = 1 << 2, |
63 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, | 63 REMOVE_DATA_MASK_INDEXEDDB = 1 << 3, |
64 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, | 64 REMOVE_DATA_MASK_LOCAL_STORAGE = 1 << 4, |
65 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, | 65 REMOVE_DATA_MASK_SHADER_CACHE = 1 << 5, |
66 REMOVE_DATA_MASK_WEBSQL = 1 << 6, | 66 REMOVE_DATA_MASK_WEBSQL = 1 << 6, |
67 | 67 |
68 REMOVE_DATA_MASK_ALL = -1 | 68 REMOVE_DATA_MASK_ALL = -1 |
69 }; | 69 }; |
70 | 70 |
71 // TODO(lazyboy): Value in the enum should start with the enum prefix | |
72 // (QUOTA_MANAGED_STORAGE_MASK_*). | |
73 enum QuotaManagedStorageMask { | 71 enum QuotaManagedStorageMask { |
74 // Corresponds to quota::kStorageTypeTemporary. | 72 // Corresponds to quota::kStorageTypeTemporary. |
75 kQuotaManagedTemporaryStorage = 1 << 0, | 73 QUOTA_MANAGED_STORAGE_MASK_TEMPORARY = 1 << 0, |
76 | 74 |
77 // Corresponds to quota::kStorageTypePersistent. | 75 // Corresponds to quota::kStorageTypePersistent. |
78 kQuotaManagedPersistentStorage = 1 << 1, | 76 QUOTA_MANAGED_STORAGE_MASK_PERSISTENT = 1 << 1, |
79 | 77 |
80 // Corresponds to quota::kStorageTypeSyncable. | 78 // Corresponds to quota::kStorageTypeSyncable. |
81 kQuotaManagedSyncableStorage = 1 << 2, | 79 QUOTA_MANAGED_STORAGE_MASK_SYNCABLE = 1 << 2, |
82 | 80 |
83 kAllStorage = -1 | 81 QUOTA_MANAGED_STORAGE_MASK_ALL = -1 |
84 }; | 82 }; |
85 | 83 |
86 // 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 |
87 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| | 85 // corresponding to the given |remove_mask| and |quota_storage_remove_mask| |
88 // inside this StoragePartition for the given |storage_origin|. | 86 // inside this StoragePartition for the given |storage_origin|. |
89 // Note session dom storage is not cleared even if you specify | 87 // Note session dom storage is not cleared even if you specify |
90 // REMOVE_DATA_MASK_LOCAL_STORAGE. | 88 // REMOVE_DATA_MASK_LOCAL_STORAGE. |
91 // | 89 // |
92 // TODO(ajwong): Right now, the embedder may have some | 90 // TODO(ajwong): Right now, the embedder may have some |
93 // URLRequestContextGetter objects that the StoragePartition does not know | 91 // URLRequestContextGetter objects that the StoragePartition does not know |
(...skipping 19 matching lines...) Expand all Loading... |
113 const base::Time& end, | 111 const base::Time& end, |
114 const base::Closure& callback) = 0; | 112 const base::Closure& callback) = 0; |
115 | 113 |
116 protected: | 114 protected: |
117 virtual ~StoragePartition() {} | 115 virtual ~StoragePartition() {} |
118 }; | 116 }; |
119 | 117 |
120 } // namespace content | 118 } // namespace content |
121 | 119 |
122 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ | 120 #endif // CONTENT_PUBLIC_BROWSER_STORAGE_PARTITION_H_ |
OLD | NEW |