| 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;
|
|
|