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

Unified Diff: storage/browser/fileapi/sandbox_directory_database.cc

Issue 602043002: FileSystem: Make SandboxDirectoryDatabase::DestroyDatabase non-static for cleanup (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: remake Created 6 years, 3 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
« no previous file with comments | « storage/browser/fileapi/sandbox_directory_database.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/fileapi/sandbox_directory_database.cc
diff --git a/storage/browser/fileapi/sandbox_directory_database.cc b/storage/browser/fileapi/sandbox_directory_database.cc
index e34d324b79e67703165f836177f76681c5056a94..97a0bc8965a51bc5e9fd447a51bef530fd2acc3f 100644
--- a/storage/browser/fileapi/sandbox_directory_database.cc
+++ b/storage/browser/fileapi/sandbox_directory_database.cc
@@ -701,14 +701,15 @@ bool SandboxDirectoryDatabase::GetNextInteger(int64* next) {
return GetNextInteger(next);
}
-// static
-bool SandboxDirectoryDatabase::DestroyDatabase(const base::FilePath& path,
- leveldb::Env* env_override) {
- std::string name = FilePathToString(path.Append(kDirectoryDatabaseName));
+bool SandboxDirectoryDatabase::DestroyDatabase() {
+ db_.reset();
+ const std::string path =
+ FilePathToString(filesystem_data_directory_.Append(
+ kDirectoryDatabaseName));
leveldb::Options options;
- if (env_override)
- options.env = env_override;
- leveldb::Status status = leveldb::DestroyDB(name, options);
+ if (env_override_)
+ options.env = env_override_;
+ leveldb::Status status = leveldb::DestroyDB(path, options);
if (status.ok())
return true;
LOG(WARNING) << "Failed to destroy a database with status " <<
« no previous file with comments | « storage/browser/fileapi/sandbox_directory_database.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698