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

Unified Diff: webkit/fileapi/file_system_directory_database.cc

Issue 7042029: Code to migrate a single directory from the old sandbox to the new. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempted windows fix. Created 9 years, 7 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 | « webkit/fileapi/file_system_directory_database.h ('k') | webkit/fileapi/file_system_origin_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_directory_database.cc
diff --git a/webkit/fileapi/file_system_directory_database.cc b/webkit/fileapi/file_system_directory_database.cc
index c21ba499b484be6d5d65d528570a444b6f37d083..2ff4758b90fcc2bd4479d65e28f487f12ffe2b0a 100644
--- a/webkit/fileapi/file_system_directory_database.cc
+++ b/webkit/fileapi/file_system_directory_database.cc
@@ -389,6 +389,22 @@ bool FileSystemDirectoryDatabase::GetNextInteger(int64* next) {
return GetNextInteger(next);
}
+// static
+bool FileSystemDirectoryDatabase::DestroyDatabase(const FilePath& path) {
+ std::string name;
+#if defined(OS_POSIX)
+ name = path.value();
+#elif defined(OS_WIN)
+ name = base::SysWideToUTF8(path.value());
+#endif
+ leveldb::Status status = leveldb::DestroyDB(name, leveldb::Options());
+ if (status.ok())
+ return true;
+ LOG(WARNING) << "Failed to destroy a database with status " <<
+ status.ToString();
+ return false;
+}
+
bool FileSystemDirectoryDatabase::Init() {
if (db_.get())
return true;
« no previous file with comments | « webkit/fileapi/file_system_directory_database.h ('k') | webkit/fileapi/file_system_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698