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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 const MessageFilterSet* GetMessageFilterSet() const; | 75 const MessageFilterSet* GetMessageFilterSet() const; |
76 | 76 |
77 // Tells storage namespaces to purge any memory they do not need. | 77 // Tells storage namespaces to purge any memory they do not need. |
78 virtual void PurgeMemory(); | 78 virtual void PurgeMemory(); |
79 | 79 |
80 // Delete any local storage files that have been touched since the cutoff | 80 // Delete any local storage files that have been touched since the cutoff |
81 // date that's supplied. Protected origins, per the SpecialStoragePolicy, | 81 // date that's supplied. Protected origins, per the SpecialStoragePolicy, |
82 // are not deleted by this method. | 82 // are not deleted by this method. |
83 void DeleteDataModifiedSince(const base::Time& cutoff); | 83 void DeleteDataModifiedSince(const base::Time& cutoff); |
84 | 84 |
85 // Delete any local storage files which are allowed to be stored only until | |
86 // the end of the session. Protected origins, per the SpecialStoragePolicy, | |
87 // are not deleted by this method. | |
88 void DeleteSessionOnlyData(); | |
89 | |
90 // Deletes a single local storage file. | 85 // Deletes a single local storage file. |
91 void DeleteLocalStorageFile(const FilePath& file_path); | 86 void DeleteLocalStorageFile(const FilePath& file_path); |
92 | 87 |
93 // Deletes the local storage file for the given origin. | 88 // Deletes the local storage file for the given origin. |
94 void DeleteLocalStorageForOrigin(const string16& origin_id); | 89 void DeleteLocalStorageForOrigin(const string16& origin_id); |
95 | 90 |
96 // Deletes all local storage files. | 91 // Deletes all local storage files. |
97 void DeleteAllLocalStorageFiles(); | 92 void DeleteAllLocalStorageFiles(); |
98 | 93 |
99 // The local storage directory. | 94 // The local storage directory. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // Maps ids to StorageNamespaces. We own these objects. | 168 // Maps ids to StorageNamespaces. We own these objects. |
174 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap; | 169 typedef std::map<int64, DOMStorageNamespace*> StorageNamespaceMap; |
175 StorageNamespaceMap storage_namespace_map_; | 170 StorageNamespaceMap storage_namespace_map_; |
176 | 171 |
177 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 172 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
178 | 173 |
179 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext); | 174 DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContext); |
180 }; | 175 }; |
181 | 176 |
182 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ | 177 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_CONTEXT_H_ |
OLD | NEW |