Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Unified Diff: content/browser/fileapi/fileapi_message_filter.cc

Issue 10828043: Wire up the deleteFileSystem operation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds comment. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/common/fileapi/file_system_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.h ('k') | content/common/fileapi/file_system_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698