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

Unified Diff: chrome/common/file_system/webfilesystem_impl.cc

Issue 3208007: Add final part of IPC plumbing for FileSystem API (Closed)
Patch Set: fixing Created 10 years, 4 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
Index: chrome/common/file_system/webfilesystem_impl.cc
diff --git a/chrome/common/file_system/webfilesystem_impl.cc b/chrome/common/file_system/webfilesystem_impl.cc
index a9aa346e5f29b61d50aebdcc61b9a5a2ba16b0a6..49a07d61da0084c9f4f91931541512ac39a5daaf 100644
--- a/chrome/common/file_system/webfilesystem_impl.cc
+++ b/chrome/common/file_system/webfilesystem_impl.cc
@@ -23,40 +23,56 @@ void WebFileSystemImpl::move(const WebString& src_path,
void WebFileSystemImpl::copy(const WebKit::WebString& src_path,
const WebKit::WebString& dest_path,
WebKit::WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Copy(src_path, dest_path, callbacks);
}
void WebFileSystemImpl::remove(const WebString& path,
WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Remove(path, callbacks);
}
void WebFileSystemImpl::readMetadata(const WebString& path,
WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->ReadMetadata(path, callbacks);
}
void WebFileSystemImpl::createFile(const WebString& path,
bool exclusive, WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Create(path, exclusive, false, callbacks);
}
void WebFileSystemImpl::createDirectory(const WebString& path,
bool exclusive, WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Create(path, exclusive, true, callbacks);
}
void WebFileSystemImpl::fileExists(const WebString& path,
WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Exists(path, false, callbacks);
}
void WebFileSystemImpl::directoryExists(const WebString& path,
WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->Exists(path, true, callbacks);
}
void WebFileSystemImpl::readDirectory(const WebString& path,
WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): not implemented yet.
+ FileSystemDispatcher* dispatcher =
+ ChildThread::current()->file_system_dispatcher();
+ dispatcher->ReadDirectory(path, callbacks);
}

Powered by Google App Engine
This is Rietveld 408576698