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

Unified Diff: webkit/dom_storage/dom_storage_database.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
« no previous file with comments | « webkit/dom_storage/dom_storage_context.cc ('k') | webkit/dom_storage/dom_storage_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_database.h
===================================================================
--- webkit/dom_storage/dom_storage_database.h (revision 127981)
+++ webkit/dom_storage/dom_storage_database.h (working copy)
@@ -22,6 +22,8 @@
// class is designed to be used on a single thread.
class DomStorageDatabase {
public:
+ static FilePath GetJournalFilePath(const FilePath& database_path);
+
explicit DomStorageDatabase(const FilePath& file_path);
virtual ~DomStorageDatabase(); // virtual for unit testing
@@ -38,6 +40,9 @@
// will be removed and all others will be inserted/updated as appropriate.
bool CommitChanges(bool clear_all_first, const ValuesMap& changes);
+ // Simple getter for the path we were constructed with.
+ const FilePath& file_path() const { return file_path_; }
+
protected:
// Constructor that uses an in-memory sqlite database, for testing.
DomStorageDatabase();
@@ -59,6 +64,7 @@
TestCanOpenFileThatIsNotADatabase);
FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, BackingDatabaseOpened);
FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, CommitTasks);
+ FRIEND_TEST_ALL_PREFIXES(DomStorageAreaTest, PurgeMemory);
enum SchemaVersion {
INVALID,
@@ -100,7 +106,7 @@
void Init();
// Path to the database on disk.
- FilePath file_path_;
+ const FilePath file_path_;
scoped_ptr<sql::Connection> db_;
bool failed_to_open_;
bool tried_to_recreate_;
« no previous file with comments | « webkit/dom_storage/dom_storage_context.cc ('k') | webkit/dom_storage/dom_storage_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698