Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Unified Diff: webkit/dom_storage/dom_storage_area.h

Issue 9817011: DomStorage data deletion and memory purging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/dom_storage/dom_storage_area.h
===================================================================
--- webkit/dom_storage/dom_storage_area.h (revision 127981)
+++ webkit/dom_storage/dom_storage_area.h (working copy)
@@ -29,6 +29,7 @@
public:
static const FilePath::CharType kDatabaseFileExtension[];
static FilePath DatabaseFileNameFromOrigin(const GURL& origin);
+ static GURL OriginFromDatabaseFileName(const FilePath& file_name);
DomStorageArea(int64 namespace_id,
const GURL& origin,
@@ -48,6 +49,17 @@
DomStorageArea* ShallowCopy(int64 destination_namespace_id);
+ bool HasUncommittedChanges() const;
+
+ // Similar to Clear() but more optimized for just deleting
+ // without raising events.
+ void DeleteOrigin();
+
+ // Frees up memory when possible. Typically, this method returns
+ // the object to its just constructed state, however if uncommitted
+ // changes are pending, it does nothing.
+ void PurgeMemory();
+
// Schedules the commit of any unsaved changes and enters a
// shutdown state such that the value getters and setters will
// no longer do anything.

Powered by Google App Engine
This is Rietveld 408576698