Index: content/browser/fileapi/fileapi_message_filter.cc |
diff --git a/content/browser/fileapi/fileapi_message_filter.cc b/content/browser/fileapi/fileapi_message_filter.cc |
index 5097b6e395e8a777fea98a0db966bf374bacdab4..75977e506a539ffd0df2f5a3f414236ce6293c95 100644 |
--- a/content/browser/fileapi/fileapi_message_filter.cc |
+++ b/content/browser/fileapi/fileapi_message_filter.cc |
@@ -150,6 +150,7 @@ bool FileAPIMessageFilter::OnMessageReceived( |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP_EX(FileAPIMessageFilter, message, *message_was_ok) |
IPC_MESSAGE_HANDLER(FileSystemHostMsg_Open, OnOpen) |
+ IPC_MESSAGE_HANDLER(FileSystemHostMsg_DeleteFileSystem, OnDeleteFileSystem) |
IPC_MESSAGE_HANDLER(FileSystemHostMsg_Move, OnMove) |
IPC_MESSAGE_HANDLER(FileSystemHostMsg_Copy, OnCopy) |
IPC_MESSAGE_HANDLER(FileSystemMsg_Remove, OnRemove) |
@@ -207,6 +208,15 @@ void FileAPIMessageFilter::OnOpen( |
&FileAPIMessageFilter::DidOpenFileSystem, this, request_id)); |
} |
+void FileAPIMessageFilter::OnDeleteFileSystem( |
+ int request_id, |
+ const GURL& origin_url, |
+ fileapi::FileSystemType type) { |
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
+ context_->DeleteFileSystem(origin_url, type, base::Bind( |
+ &FileAPIMessageFilter::DidDeleteFileSystem, this, request_id)); |
+} |
+ |
void FileAPIMessageFilter::OnMove( |
int request_id, const GURL& src_path, const GURL& dest_path) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
@@ -652,6 +662,17 @@ void FileAPIMessageFilter::DidOpenFileSystem(int request_id, |
// For OpenFileSystem we do not create a new operation, so no unregister here. |
} |
+void FileAPIMessageFilter::DidDeleteFileSystem( |
+ int request_id, |
+ base::PlatformFileError result) { |
+ if (result == base::PLATFORM_FILE_OK) |
+ Send(new FileSystemMsg_DidSucceed(request_id)); |
+ else |
+ Send(new FileSystemMsg_DidFail(request_id, result)); |
+ // For DeleteFileSystem we do not create a new operation, |
+ // so no unregister here. |
+} |
+ |
void FileAPIMessageFilter::DidCreateSnapshot( |
int request_id, |
const base::Callback<void(const FilePath&)>& register_file_callback, |