| Index: third_party/WebKit/Source/modules/filesystem/FileSystemSync.cpp
|
| diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemSync.cpp
|
| similarity index 82%
|
| rename from third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
|
| rename to third_party/WebKit/Source/modules/filesystem/FileSystemSync.cpp
|
| index ea862aa218899a7e5a418ed16cbb0008c31792da..97752204542d5b854985a5d945df020d2ba2ab88 100644
|
| --- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
|
| +++ b/third_party/WebKit/Source/modules/filesystem/FileSystemSync.cpp
|
| @@ -28,16 +28,16 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#include "modules/filesystem/DOMFileSystemSync.h"
|
| +#include "modules/filesystem/FileSystemSync.h"
|
|
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/fileapi/File.h"
|
| #include "core/fileapi/FileError.h"
|
| #include "modules/filesystem/DOMFilePath.h"
|
| -#include "modules/filesystem/DirectoryEntrySync.h"
|
| #include "modules/filesystem/ErrorCallback.h"
|
| -#include "modules/filesystem/FileEntrySync.h"
|
| #include "modules/filesystem/FileSystemCallbacks.h"
|
| +#include "modules/filesystem/FileSystemDirectoryEntrySync.h"
|
| +#include "modules/filesystem/FileSystemFileEntrySync.h"
|
| #include "modules/filesystem/FileWriterBaseCallback.h"
|
| #include "modules/filesystem/FileWriterSync.h"
|
| #include "platform/FileMetadata.h"
|
| @@ -50,26 +50,27 @@ namespace blink {
|
|
|
| class FileWriterBase;
|
|
|
| -DOMFileSystemSync* DOMFileSystemSync::create(DOMFileSystemBase* fileSystem) {
|
| - return new DOMFileSystemSync(fileSystem->m_context, fileSystem->name(),
|
| - fileSystem->type(), fileSystem->rootURL());
|
| +FileSystemSync* FileSystemSync::create(FileSystemBase* fileSystem) {
|
| + return new FileSystemSync(fileSystem->m_context, fileSystem->name(),
|
| + fileSystem->type(), fileSystem->rootURL());
|
| }
|
|
|
| -DOMFileSystemSync::DOMFileSystemSync(ExecutionContext* context,
|
| - const String& name,
|
| - FileSystemType type,
|
| - const KURL& rootURL)
|
| - : DOMFileSystemBase(context, name, type, rootURL),
|
| - m_rootEntry(DirectoryEntrySync::create(this, DOMFilePath::root)) {}
|
| +FileSystemSync::FileSystemSync(ExecutionContext* context,
|
| + const String& name,
|
| + FileSystemType type,
|
| + const KURL& rootURL)
|
| + : FileSystemBase(context, name, type, rootURL),
|
| + m_rootEntry(
|
| + FileSystemDirectoryEntrySync::create(this, DOMFilePath::root)) {}
|
|
|
| -DOMFileSystemSync::~DOMFileSystemSync() {}
|
| +FileSystemSync::~FileSystemSync() {}
|
|
|
| -void DOMFileSystemSync::reportError(ErrorCallbackBase* errorCallback,
|
| - FileError::ErrorCode fileError) {
|
| +void FileSystemSync::reportError(ErrorCallbackBase* errorCallback,
|
| + FileError::ErrorCode fileError) {
|
| errorCallback->invoke(fileError);
|
| }
|
|
|
| -DirectoryEntrySync* DOMFileSystemSync::root() {
|
| +FileSystemDirectoryEntrySync* FileSystemSync::root() {
|
| return m_rootEntry.get();
|
| }
|
|
|
| @@ -117,7 +118,7 @@ class CreateFileHelper final : public AsyncFileSystemCallbacks {
|
| // can't be safely deleted.
|
|
|
| m_result->m_file =
|
| - DOMFileSystemBase::createFile(metadata, m_url, m_type, m_name);
|
| + FileSystemBase::createFile(metadata, m_url, m_type, m_name);
|
| }
|
|
|
| bool shouldBlockUntilCompletion() const override { return true; }
|
| @@ -137,8 +138,8 @@ class CreateFileHelper final : public AsyncFileSystemCallbacks {
|
|
|
| } // namespace
|
|
|
| -File* DOMFileSystemSync::createFile(const FileEntrySync* fileEntry,
|
| - ExceptionState& exceptionState) {
|
| +File* FileSystemSync::createFile(const FileSystemFileEntrySync* fileEntry,
|
| + ExceptionState& exceptionState) {
|
| KURL fileSystemURL = createFileSystemURL(fileEntry);
|
| CreateFileHelper::CreateFileResult* result(
|
| CreateFileHelper::CreateFileResult::create());
|
| @@ -187,10 +188,10 @@ class LocalErrorCallback final : public ErrorCallbackBase {
|
|
|
| } // namespace
|
|
|
| -FileWriterSync* DOMFileSystemSync::createWriter(
|
| - const FileEntrySync* fileEntry,
|
| +FileWriterSync* FileSystemSync::createWriter(
|
| + const FileSystemFileEntrySync* fileEntry,
|
| ExceptionState& exceptionState) {
|
| - ASSERT(fileEntry);
|
| + DCHECK(fileEntry);
|
|
|
| FileWriterSync* fileWriter = FileWriterSync::create();
|
| ReceiveFileWriterCallback* successCallback =
|
| @@ -212,8 +213,8 @@ FileWriterSync* DOMFileSystemSync::createWriter(
|
| return fileWriter;
|
| }
|
|
|
| -DEFINE_TRACE(DOMFileSystemSync) {
|
| - DOMFileSystemBase::trace(visitor);
|
| +DEFINE_TRACE(FileSystemSync) {
|
| + FileSystemBase::trace(visitor);
|
| visitor->trace(m_rootEntry);
|
| }
|
|
|
|
|