#include "base/time/time.h"
#include "webkit/browser/webkit_storage_browser_export.h"
+namespace content {
+class SandboxDirectoryDatabaseTest;
+}
+
namespace tracked_objects {
class Location;
}
namespace leveldb {
class DB;
+class Env;
class Status;
class WriteBatch;
}
base::Time modification_time;
};
- explicit SandboxDirectoryDatabase(
- const base::FilePath& filesystem_data_directory);
+ SandboxDirectoryDatabase(
+ const base::FilePath& filesystem_data_directory,
+ leveldb::Env* env_override);
~SandboxDirectoryDatabase();
bool GetChildWithName(
// Returns true if the database looks consistent with local filesystem.
bool IsFileSystemConsistent();
- static bool DestroyDatabase(const base::FilePath& path);
+ static bool DestroyDatabase(const base::FilePath& path,
+ leveldb::Env* env_override);
private:
enum RecoveryOption {
FAIL_ON_CORRUPTION,
};
+ friend class content::SandboxDirectoryDatabaseTest;
friend class ObfuscatedFileUtil;
- friend class SandboxDirectoryDatabaseTest;
bool Init(RecoveryOption recovery_option);
bool RepairDatabase(const std::string& db_path);
const leveldb::Status& status);
const base::FilePath filesystem_data_directory_;
+ leveldb::Env* env_override_;
scoped_ptr<leveldb::DB> db_;
base::Time last_reported_time_;
DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase);