| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/child/fileapi/webfilesystem_impl.h" | 5 #include "content/child/fileapi/webfilesystem_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "content/child/child_thread.h" | 8 #include "content/child/child_thread.h" |
| 9 #include "content/child/fileapi/file_system_dispatcher.h" | 9 #include "content/child/fileapi/file_system_dispatcher.h" |
| 10 #include "content/child/fileapi/webfilesystem_callback_adapters.h" | 10 #include "content/child/fileapi/webfilesystem_callback_adapters.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 GURL(path), | 75 GURL(path), |
| 76 base::Bind(&ReadMetadataCallbackAdapter, callbacks), | 76 base::Bind(&ReadMetadataCallbackAdapter, callbacks), |
| 77 base::Bind(&FileStatusCallbackAdapter, callbacks)); | 77 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void WebFileSystemImpl::createFile(const WebURL& path, | 80 void WebFileSystemImpl::createFile(const WebURL& path, |
| 81 bool exclusive, | 81 bool exclusive, |
| 82 WebFileSystemCallbacks* callbacks) { | 82 WebFileSystemCallbacks* callbacks) { |
| 83 FileSystemDispatcher* dispatcher = | 83 FileSystemDispatcher* dispatcher = |
| 84 ChildThread::current()->file_system_dispatcher(); | 84 ChildThread::current()->file_system_dispatcher(); |
| 85 dispatcher->Create( | 85 dispatcher->CreateFile( |
| 86 GURL(path), exclusive, false /* directory */, false /* recursive */, | 86 GURL(path), exclusive, |
| 87 base::Bind(&FileStatusCallbackAdapter, callbacks)); | 87 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void WebFileSystemImpl::createDirectory(const WebURL& path, | 90 void WebFileSystemImpl::createDirectory(const WebURL& path, |
| 91 bool exclusive, | 91 bool exclusive, |
| 92 WebFileSystemCallbacks* callbacks) { | 92 WebFileSystemCallbacks* callbacks) { |
| 93 FileSystemDispatcher* dispatcher = | 93 FileSystemDispatcher* dispatcher = |
| 94 ChildThread::current()->file_system_dispatcher(); | 94 ChildThread::current()->file_system_dispatcher(); |
| 95 dispatcher->Create( | 95 dispatcher->CreateDirectory( |
| 96 GURL(path), exclusive, true /* directory */, false /* recursive */, | 96 GURL(path), exclusive, false /* recursive */, |
| 97 base::Bind(&FileStatusCallbackAdapter, callbacks)); | 97 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 98 } | 98 } |
| 99 | 99 |
| 100 void WebFileSystemImpl::fileExists(const WebURL& path, | 100 void WebFileSystemImpl::fileExists(const WebURL& path, |
| 101 WebFileSystemCallbacks* callbacks) { | 101 WebFileSystemCallbacks* callbacks) { |
| 102 FileSystemDispatcher* dispatcher = | 102 FileSystemDispatcher* dispatcher = |
| 103 ChildThread::current()->file_system_dispatcher(); | 103 ChildThread::current()->file_system_dispatcher(); |
| 104 dispatcher->Exists( | 104 dispatcher->Exists( |
| 105 GURL(path), false /* directory */, | 105 GURL(path), false /* directory */, |
| 106 base::Bind(&FileStatusCallbackAdapter, callbacks)); | 106 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 135 WebKit::WebFileSystemCallbacks* callbacks) { | 135 WebKit::WebFileSystemCallbacks* callbacks) { |
| 136 FileSystemDispatcher* dispatcher = | 136 FileSystemDispatcher* dispatcher = |
| 137 ChildThread::current()->file_system_dispatcher(); | 137 ChildThread::current()->file_system_dispatcher(); |
| 138 dispatcher->CreateSnapshotFile( | 138 dispatcher->CreateSnapshotFile( |
| 139 GURL(path), | 139 GURL(path), |
| 140 base::Bind(&CreateSnapshotFileCallbackAdapter, callbacks), | 140 base::Bind(&CreateSnapshotFileCallbackAdapter, callbacks), |
| 141 base::Bind(&FileStatusCallbackAdapter, callbacks)); | 141 base::Bind(&FileStatusCallbackAdapter, callbacks)); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace content | 144 } // namespace content |
| OLD | NEW |