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

Unified Diff: webkit/fileapi/file_system_origin_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_origin_database.h
diff --git a/webkit/fileapi/file_system_origin_database.h b/webkit/fileapi/file_system_origin_database.h
index ac729dfbf50d9433fb64328a4409510987fd96ce..354fef178fd3065c412e876ca6072ead73564a8f 100644
--- a/webkit/fileapi/file_system_origin_database.h
+++ b/webkit/fileapi/file_system_origin_database.h
@@ -23,6 +23,11 @@ namespace fileapi {
// the browser's FILE thread. The constructor may be used on any thread.
class FileSystemOriginDatabase {
public:
+ enum RecoveringOption {
+ REBUILD_ON_CORRUPTION,
+ LEAVE_ON_CORRUPTION,
+ };
+
struct OriginRecord {
std::string origin;
FilePath path;
@@ -52,7 +57,7 @@ class FileSystemOriginDatabase {
void DropDatabase();
private:
- bool Init();
+ bool Init(RecoveringOption recovering_option);
void HandleError(const tracked_objects::Location& from_here,
leveldb::Status status);
bool GetLastPathNumber(int* number);

Powered by Google App Engine
This is Rietveld 408576698