FileSystem should provide a way to delete filesystem.
https://bugs.webkit.org/show_bug.cgi?id=91861

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-07-25
Reviewed by Adam Barth.

Source/WebCore:

We will add a test when we wire-up the feature to Inspector.

* Modules/filesystem/LocalFileSystem.cpp: Add deleteFileSystem
(WebCore::deleteFileSystem):
(WebCore):
(WebCore::LocalFileSystem::deleteFileSystem):
* Modules/filesystem/LocalFileSystem.h:
(LocalFileSystem):
* platform/AsyncFileSystem.cpp: Add deleteFileSystem
(WebCore):
(WebCore::AsyncFileSystem::deleteFileSystem):
* platform/AsyncFileSystem.h:
(AsyncFileSystem):
* platform/blackberry/AsyncFileSystemBlackBerry.cpp: Add deleteFileSystem
(WebCore::AsyncFileSystem::deleteFileSystem):
(WebCore):
* platform/gtk/AsyncFileSystemGtk.cpp: Add deleteFileSystem
(WebCore::AsyncFileSystem::deleteFileSystem):
(WebCore):

Source/WebKit/chromium:

* public/WebFrameClient.h:
(WebFrameClient):
(WebKit::WebFrameClient::deleteFileSystem):
* src/LocalFileSystemChromium.cpp: Add deleteFileSystem
(WebCore::deleteFileSystemNotAllowed):
(WebCore):
(WebCore::LocalFileSystem::deleteFileSystem):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/platform/AsyncFileSystem.h b/Source/WebCore/platform/AsyncFileSystem.h
index c33d6a0..1f5ca5e 100644
--- a/Source/WebCore/platform/AsyncFileSystem.h
+++ b/Source/WebCore/platform/AsyncFileSystem.h
@@ -64,8 +64,12 @@
     static PassOwnPtr<AsyncFileSystem> create();
 
     // Opens a new file system. The create parameter specifies whether or not to create the path if it does not already exists.
+    // FIXME: Add FileSystemType parameter.
     static void openFileSystem(const String& basePath, const String& storageIdentifier, bool create, PassOwnPtr<AsyncFileSystemCallbacks>);
 
+    // Deletes the file system.
+    static void deleteFileSystem(const String& basePath, const String& storageIdentifier, FileSystemType, PassOwnPtr<AsyncFileSystemCallbacks>);
+
     // Moves a file or directory from srcPath to destPath.
     // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully.
     // AsyncFileSystemCallbacks::didFail() is called otherwise.