summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp45
1 files changed, 25 insertions, 20 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp b/chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
index b5b4d5d9dcf..11806640795 100644
--- a/chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
+++ b/chromium/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
@@ -43,52 +43,57 @@
namespace WebCore {
-PassRefPtr<EntrySync> EntrySync::create(EntryBase* entry)
+EntrySync* EntrySync::create(EntryBase* entry)
{
if (entry->isFile())
- return adoptRef(new FileEntrySync(entry->m_fileSystem, entry->m_fullPath));
- return adoptRef(new DirectoryEntrySync(entry->m_fileSystem, entry->m_fullPath));
+ return FileEntrySync::create(entry->m_fileSystem, entry->m_fullPath);
+ return DirectoryEntrySync::create(entry->m_fileSystem, entry->m_fullPath);
}
-PassRefPtr<Metadata> EntrySync::getMetadata(ExceptionState& exceptionState)
+Metadata* EntrySync::getMetadata(ExceptionState& exceptionState)
{
- MetadataSyncCallbackHelper helper;
- m_fileSystem->getMetadata(this, helper.successCallback(), helper.errorCallback(), DOMFileSystemBase::Synchronous);
- return helper.getResult(exceptionState);
+ RefPtr<MetadataSyncCallbackHelper> helper = MetadataSyncCallbackHelper::create();
+ m_fileSystem->getMetadata(this, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
+ return helper->getResult(exceptionState);
}
-PassRefPtr<EntrySync> EntrySync::moveTo(PassRefPtr<DirectoryEntrySync> parent, const String& name, ExceptionState& exceptionState) const
+EntrySync* EntrySync::moveTo(DirectoryEntrySync* parent, const String& name, ExceptionState& exceptionState) const
{
- EntrySyncCallbackHelper helper;
- m_fileSystem->move(this, parent.get(), name, helper.successCallback(), helper.errorCallback(), DOMFileSystemBase::Synchronous);
- return helper.getResult(exceptionState);
+ RefPtr<EntrySyncCallbackHelper> helper = EntrySyncCallbackHelper::create();
+ m_fileSystem->move(this, parent, name, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
+ return helper->getResult(exceptionState);
}
-PassRefPtr<EntrySync> EntrySync::copyTo(PassRefPtr<DirectoryEntrySync> parent, const String& name, ExceptionState& exceptionState) const
+EntrySync* EntrySync::copyTo(DirectoryEntrySync* parent, const String& name, ExceptionState& exceptionState) const
{
- EntrySyncCallbackHelper helper;
- m_fileSystem->copy(this, parent.get(), name, helper.successCallback(), helper.errorCallback(), DOMFileSystemBase::Synchronous);
- return helper.getResult(exceptionState);
+ RefPtr<EntrySyncCallbackHelper> helper = EntrySyncCallbackHelper::create();
+ m_fileSystem->copy(this, parent, name, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
+ return helper->getResult(exceptionState);
}
void EntrySync::remove(ExceptionState& exceptionState) const
{
- VoidSyncCallbackHelper helper;
- m_fileSystem->remove(this, helper.successCallback(), helper.errorCallback(), DOMFileSystemBase::Synchronous);
- helper.getResult(exceptionState);
+ RefPtr<VoidSyncCallbackHelper> helper = VoidSyncCallbackHelper::create();
+ m_fileSystem->remove(this, helper->successCallback(), helper->errorCallback(), DOMFileSystemBase::Synchronous);
+ helper->getResult(exceptionState);
}
-PassRefPtr<EntrySync> EntrySync::getParent() const
+EntrySync* EntrySync::getParent() const
{
// Sync verion of getParent doesn't throw exceptions.
String parentPath = DOMFilePath::getDirectory(fullPath());
return DirectoryEntrySync::create(m_fileSystem, parentPath);
}
-EntrySync::EntrySync(PassRefPtr<DOMFileSystemBase> fileSystem, const String& fullPath)
+EntrySync::EntrySync(DOMFileSystemBase* fileSystem, const String& fullPath)
: EntryBase(fileSystem, fullPath)
{
ScriptWrappable::init(this);
}
+void EntrySync::trace(Visitor* visitor)
+{
+ EntryBase::trace(visitor);
+}
+
}