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

Unified Diff: webkit/browser/fileapi/sandbox_directory_database.h

Issue 145693005: [FileAPI] Replace default leveldb::Env with leveldb::MemEnv in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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/browser/fileapi/sandbox_directory_database.h
diff --git a/webkit/browser/fileapi/sandbox_directory_database.h b/webkit/browser/fileapi/sandbox_directory_database.h
index a984cc4d59746e2068fda4f1a10db0b8dd4ab2f6..e8a12312f0128bd3752e6211ea0ede3322f47ae4 100644
--- a/webkit/browser/fileapi/sandbox_directory_database.h
+++ b/webkit/browser/fileapi/sandbox_directory_database.h
@@ -20,6 +20,7 @@ class Location;
namespace leveldb {
class DB;
+class Env;
class Status;
class WriteBatch;
}
@@ -56,8 +57,9 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
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(
@@ -93,7 +95,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
// 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 {
@@ -117,6 +120,7 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE SandboxDirectoryDatabase {
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);
« no previous file with comments | « webkit/browser/fileapi/quota/quota_backend_impl_unittest.cc ('k') | webkit/browser/fileapi/sandbox_directory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698