OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ |
6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 const MessageFilterSet* GetMessageFilterSet() const; | 73 const MessageFilterSet* GetMessageFilterSet() const; |
74 | 74 |
75 // Tells storage namespaces to purge any memory they do not need. | 75 // Tells storage namespaces to purge any memory they do not need. |
76 virtual void PurgeMemory(); | 76 virtual void PurgeMemory(); |
77 | 77 |
78 // Delete any local storage files that have been touched since the cutoff | 78 // Delete any local storage files that have been touched since the cutoff |
79 // date that's supplied. Protected origins, per the SpecialStoragePolicy, | 79 // date that's supplied. Protected origins, per the SpecialStoragePolicy, |
80 // are not deleted by this method. | 80 // are not deleted by this method. |
81 void DeleteDataModifiedSince(const base::Time& cutoff); | 81 void DeleteDataModifiedSince(const base::Time& cutoff); |
82 | 82 |
| 83 // Delete any local storage files which are allowed to be stored only until |
| 84 // the end of the session. Protected origins, per the SpecialStoragePolicy, |
| 85 // are not deleted by this method. |
| 86 void DeleteSessionOnlyData(); |
| 87 |
83 // Deletes a single local storage file. | 88 // Deletes a single local storage file. |
84 void DeleteLocalStorageFile(const FilePath& file_path); | 89 void DeleteLocalStorageFile(const FilePath& file_path); |
85 | 90 |
86 // Deletes the local storage file for the given origin. | 91 // Deletes the local storage file for the given origin. |
87 void DeleteLocalStorageForOrigin(const string16& origin_id); | 92 void DeleteLocalStorageForOrigin(const string16& origin_id); |
88 | 93 |
89 // Deletes all local storage files. | 94 // Deletes all local storage files. |
90 void DeleteAllLocalStorageFiles(); | 95 void DeleteAllLocalStorageFiles(); |
91 | 96 |
92 // The local storage directory. | 97 // The local storage directory. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 // Maps ids to StorageNamespaces. We own these objects. | 160 // Maps ids to StorageNamespaces. We own these objects. |
156 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap; | 161 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap; |
157 StorageNamespaceMap storage_namespace_map_; | 162 StorageNamespaceMap storage_namespace_map_; |
158 | 163 |
159 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 164 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
160 | 165 |
161 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext); | 166 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext); |
162 }; | 167 }; |
163 | 168 |
164 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ | 169 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ |
OLD | NEW |