| 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_;
|
|
|