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

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: bool -> enum 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..98d98e38b650ba068c166e419008d693ad2a5e78 100644
--- a/webkit/fileapi/file_system_directory_database.h
+++ b/webkit/fileapi/file_system_directory_database.h
@@ -18,6 +18,7 @@ class Location;
}
namespace leveldb {
+class Status;
jsbell 2012/03/10 00:54:50 This can be removed from the .h now.
tzik 2012/03/13 06:40:29 Done.
class WriteBatch;
}
@@ -37,6 +38,10 @@ namespace fileapi {
class FileSystemDirectoryDatabase {
public:
typedef int64 FileId;
+ enum RecoveringOption {
ericu 2012/03/12 19:46:01 I'd prefer RecoveryOption to RecoveringOption, and
tzik 2012/03/13 06:40:29 Done.
+ REBUILD_ON_CORRUPTION,
+ LEAVE_ON_CORRUPTION,
+ };
struct FileInfo {
FileInfo();
@@ -87,7 +92,7 @@ class FileSystemDirectoryDatabase {
static bool DestroyDatabase(const FilePath& path);
private:
- bool Init();
+ bool Init(RecoveringOption recovering_option);
bool StoreDefaultValues();
bool GetLastFileId(FileId* file_id);
bool VerifyIsDirectory(FileId file_id);
« no previous file with comments | « no previous file | webkit/fileapi/file_system_directory_database.cc » ('j') | webkit/fileapi/file_system_directory_database.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698