summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
index f9f3b2ca188..7d490d34249 100644
--- a/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
+++ b/chromium/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
@@ -187,7 +187,7 @@ bool DOMFileSystemBase::pathPrefixToFileSystemType(const String& pathPrefix, Fil
void DOMFileSystemBase::getMetadata(const EntryBase* entry, PassOwnPtr<MetadataCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
- OwnPtr<AsyncFileSystemCallbacks> callbacks(MetadataCallbacks::create(successCallback, errorCallback, this));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(MetadataCallbacks::create(successCallback, errorCallback, m_context, this));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
fileSystem()->readMetadata(createFileSystemURL(entry), callbacks.release());
}
@@ -229,7 +229,7 @@ void DOMFileSystemBase::move(const EntryBase* source, EntryBase* parent, const S
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, parent->filesystem(), destinationPath, source->isDirectory()));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, m_context, parent->filesystem(), destinationPath, source->isDirectory()));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
fileSystem()->move(createFileSystemURL(source), parent->filesystem()->createFileSystemURL(destinationPath), callbacks.release());
@@ -243,7 +243,7 @@ void DOMFileSystemBase::copy(const EntryBase* source, EntryBase* parent, const S
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, parent->filesystem(), destinationPath, source->isDirectory()));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, m_context, parent->filesystem(), destinationPath, source->isDirectory()));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
fileSystem()->copy(createFileSystemURL(source), parent->filesystem()->createFileSystemURL(destinationPath), callbacks.release());
@@ -258,7 +258,7 @@ void DOMFileSystemBase::remove(const EntryBase* entry, PassOwnPtr<VoidCallback>
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(VoidCallbacks::create(successCallback, errorCallback, this));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(VoidCallbacks::create(successCallback, errorCallback, m_context, this));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
fileSystem()->remove(createFileSystemURL(entry), callbacks.release());
@@ -273,7 +273,7 @@ void DOMFileSystemBase::removeRecursively(const EntryBase* entry, PassOwnPtr<Voi
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(VoidCallbacks::create(successCallback, errorCallback, this));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(VoidCallbacks::create(successCallback, errorCallback, m_context, this));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
fileSystem()->removeRecursively(createFileSystemURL(entry), callbacks.release());
@@ -283,7 +283,7 @@ void DOMFileSystemBase::getParent(const EntryBase* entry, PassOwnPtr<EntryCallba
{
ASSERT(entry);
String path = DOMFilePath::getDirectory(entry->fullPath());
- fileSystem()->directoryExists(createFileSystemURL(path), EntryCallbacks::create(successCallback, errorCallback, this, path, true));
+ fileSystem()->directoryExists(createFileSystemURL(path), EntryCallbacks::create(successCallback, errorCallback, m_context, this, path, true));
}
void DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, const FileSystemFlags& flags, PassOwnPtr<EntryCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
@@ -294,7 +294,7 @@ void DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, cons
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, this, absolutePath, false));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, m_context, this, absolutePath, false));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
if (flags.create)
@@ -311,7 +311,7 @@ void DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path,
return;
}
- OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, this, absolutePath, true));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(EntryCallbacks::create(successCallback, errorCallback, m_context, this, absolutePath, true));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
if (flags.create)
@@ -320,15 +320,19 @@ void DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path,
fileSystem()->directoryExists(createFileSystemURL(absolutePath), callbacks.release());
}
-bool DOMFileSystemBase::readDirectory(PassRefPtr<DirectoryReaderBase> reader, const String& path, PassOwnPtr<EntriesCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
+int DOMFileSystemBase::readDirectory(DirectoryReaderBase* reader, const String& path, PassOwnPtr<EntriesCallback> successCallback, PassOwnPtr<ErrorCallback> errorCallback, SynchronousType synchronousType)
{
ASSERT(DOMFilePath::isAbsolute(path));
- OwnPtr<AsyncFileSystemCallbacks> callbacks(EntriesCallbacks::create(successCallback, errorCallback, reader, path));
+ OwnPtr<AsyncFileSystemCallbacks> callbacks(EntriesCallbacks::create(successCallback, errorCallback, m_context, reader, path));
callbacks->setShouldBlockUntilCompletion(synchronousType == Synchronous);
- fileSystem()->readDirectory(createFileSystemURL(path), callbacks.release());
- return true;
+ return fileSystem()->readDirectory(createFileSystemURL(path), callbacks.release());
+}
+
+bool DOMFileSystemBase::waitForAdditionalResult(int callbacksId)
+{
+ return fileSystem()->waitForAdditionalResult(callbacksId);
}
} // namespace WebCore