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

Unified Diff: webkit/fileapi/file_system_directory_database.h

Issue 9663021: Add database recovery for FileSystemOriginDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deletion for directory database 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/fileapi/file_system_directory_database.h
diff --git a/webkit/fileapi/file_system_directory_database.h b/webkit/fileapi/file_system_directory_database.h
index 1c760b8e3fd8c487e708a8830553f0c576a625ce..c1286d950f56d70457595f7fc443d6509b80d22e 100644
--- a/webkit/fileapi/file_system_directory_database.h
+++ b/webkit/fileapi/file_system_directory_database.h
@@ -87,7 +87,12 @@ class FileSystemDirectoryDatabase {
static bool DestroyDatabase(const FilePath& path);
private:
- bool Init();
+ enum RecoveryOption {
+ DELETE_ON_CORRUPTION,
+ FAIL_ON_CORRUPTION,
ericu 2012/03/19 16:50:05 We should also attempt to repair here before delet
tzik 2012/03/21 08:59:21 To avoid web apps facing inconsistency, we can't s
ericu 2012/03/22 03:54:17 Sounds good.
+ };
+
+ bool Init(RecoveryOption recovery_option);
bool StoreDefaultValues();
bool GetLastFileId(FileId* file_id);
bool VerifyIsDirectory(FileId file_id);
@@ -97,7 +102,7 @@ class FileSystemDirectoryDatabase {
void HandleError(const tracked_objects::Location& from_here,
leveldb::Status status);
- std::string path_;
+ FilePath sandbox_directory_;
scoped_ptr<leveldb::DB> db_;
};
« no previous file with comments | « no previous file | webkit/fileapi/file_system_directory_database.cc » ('j') | webkit/fileapi/file_system_origin_database.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698