Index: webkit/fileapi/file_system_context.cc |
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc |
index 2b8c7fa9a53ac484fc8c00076001f3f16e7be418..27219b418493242068282e1e9d922fbc70d6d26f 100644 |
--- a/webkit/fileapi/file_system_context.cc |
+++ b/webkit/fileapi/file_system_context.cc |
@@ -36,10 +36,11 @@ QuotaClient* CreateQuotaClient( |
return new FileSystemQuotaClient(context, is_incognito); |
} |
-void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, |
- const GURL& filesystem_root, |
- const std::string& filesystem_name, |
- base::PlatformFileError error) { |
+void DidOpenFileSystem( |
+ const FileSystemContext::OpenFileSystemCallback& callback, |
+ const GURL& filesystem_root, |
+ const std::string& filesystem_name, |
+ base::PlatformFileError error) { |
callback.Run(error, filesystem_name, filesystem_root); |
} |
@@ -149,7 +150,7 @@ void FileSystemContext::OpenFileSystem( |
const GURL& origin_url, |
FileSystemType type, |
bool create, |
- OpenFileSystemCallback callback) { |
+ const OpenFileSystemCallback& callback) { |
DCHECK(!callback.is_null()); |
FileSystemMountPointProvider* mount_point_provider = |
@@ -167,6 +168,20 @@ void FileSystemContext::OpenFileSystem( |
base::Bind(&DidOpenFileSystem, callback, root_url, name)); |
} |
+void FileSystemContext::DeleteFileSystem( |
kinuko
2012/07/30 21:53:38
This could be done in a separate CL but I think we
nhiroki (google)
2012/07/31 15:50:32
I see. I will cleanup in another CL.
|
+ const GURL& origin_url, |
+ FileSystemType type, |
+ const DeleteFileSystemCallback& callback) { |
+ FileSystemMountPointProvider* mount_point_provider = |
+ GetMountPointProvider(type); |
+ if (!mount_point_provider) { |
+ callback.Run(base::PLATFORM_FILE_ERROR_SECURITY); |
+ return; |
+ } |
+ |
+ mount_point_provider->DeleteFileSystem(origin_url, type, this, callback); |
+} |
+ |
FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( |
const FileSystemURL& url) { |
if (!url.is_valid()) |