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 285a6ff4bd6203c696990ba9d6f0a8465761bcdb..33db65348a893453c060d1c4d340b4f31e969f41 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)); |
@@ -649,6 +659,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 GURL& blob_url, |