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

Unified Diff: third_party/WebKit/Source/modules/filesystem/FileSystemEntrySync.cpp

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years, 1 month 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: third_party/WebKit/Source/modules/filesystem/FileSystemEntrySync.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemEntrySync.cpp
similarity index 59%
rename from third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
rename to third_party/WebKit/Source/modules/filesystem/FileSystemEntrySync.cpp
index 88b7479f83390ca772451a17e69f5d9fc98b247f..0e7a078d982d420a41abc9fe721e74909db7918a 100644
--- a/third_party/WebKit/Source/modules/filesystem/EntrySync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemEntrySync.cpp
@@ -28,72 +28,76 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "modules/filesystem/EntrySync.h"
+#include "modules/filesystem/FileSystemEntrySync.h"
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
#include "modules/filesystem/DOMFilePath.h"
-#include "modules/filesystem/DirectoryEntry.h"
-#include "modules/filesystem/DirectoryEntrySync.h"
-#include "modules/filesystem/FileEntrySync.h"
-#include "modules/filesystem/Metadata.h"
+#include "modules/filesystem/FileSystemDirectoryEntry.h"
+#include "modules/filesystem/FileSystemDirectoryEntrySync.h"
+#include "modules/filesystem/FileSystemFileEntrySync.h"
+#include "modules/filesystem/FileSystemMetadata.h"
#include "modules/filesystem/SyncCallbackHelper.h"
namespace blink {
-EntrySync* EntrySync::create(EntryBase* entry) {
- if (entry->isFile())
- return FileEntrySync::create(entry->m_fileSystem, entry->m_fullPath);
- return DirectoryEntrySync::create(entry->m_fileSystem, entry->m_fullPath);
+FileSystemEntrySync* FileSystemEntrySync::create(FileSystemEntryBase* entry) {
+ if (entry->isFile()) {
+ return FileSystemFileEntrySync::create(entry->m_fileSystem,
+ entry->m_fullPath);
+ }
+ return FileSystemDirectoryEntrySync::create(entry->m_fileSystem,
+ entry->m_fullPath);
}
-Metadata* EntrySync::getMetadata(ExceptionState& exceptionState) {
+FileSystemMetadata* FileSystemEntrySync::getMetadata(
+ ExceptionState& exceptionState) {
MetadataSyncCallbackHelper* helper = MetadataSyncCallbackHelper::create();
m_fileSystem->getMetadata(this, helper->getSuccessCallback(),
helper->getErrorCallback(),
- DOMFileSystemBase::Synchronous);
+ FileSystemBase::Synchronous);
return helper->getResult(exceptionState);
}
-EntrySync* EntrySync::moveTo(DirectoryEntrySync* parent,
- const String& name,
- ExceptionState& exceptionState) const {
+FileSystemEntrySync* FileSystemEntrySync::moveTo(
+ FileSystemDirectoryEntrySync* parent,
+ const String& name,
+ ExceptionState& exceptionState) const {
EntrySyncCallbackHelper* helper = EntrySyncCallbackHelper::create();
m_fileSystem->move(this, parent, name, helper->getSuccessCallback(),
- helper->getErrorCallback(),
- DOMFileSystemBase::Synchronous);
+ helper->getErrorCallback(), FileSystemBase::Synchronous);
return helper->getResult(exceptionState);
}
-EntrySync* EntrySync::copyTo(DirectoryEntrySync* parent,
- const String& name,
- ExceptionState& exceptionState) const {
+FileSystemEntrySync* FileSystemEntrySync::copyTo(
+ FileSystemDirectoryEntrySync* parent,
+ const String& name,
+ ExceptionState& exceptionState) const {
EntrySyncCallbackHelper* helper = EntrySyncCallbackHelper::create();
m_fileSystem->copy(this, parent, name, helper->getSuccessCallback(),
- helper->getErrorCallback(),
- DOMFileSystemBase::Synchronous);
+ helper->getErrorCallback(), FileSystemBase::Synchronous);
return helper->getResult(exceptionState);
}
-void EntrySync::remove(ExceptionState& exceptionState) const {
+void FileSystemEntrySync::remove(ExceptionState& exceptionState) const {
VoidSyncCallbackHelper* helper = VoidSyncCallbackHelper::create();
m_fileSystem->remove(this, helper->getSuccessCallback(),
- helper->getErrorCallback(),
- DOMFileSystemBase::Synchronous);
+ helper->getErrorCallback(), FileSystemBase::Synchronous);
helper->getResult(exceptionState);
}
-EntrySync* EntrySync::getParent() const {
+FileSystemEntrySync* FileSystemEntrySync::getParent() const {
// Sync verion of getParent doesn't throw exceptions.
String parentPath = DOMFilePath::getDirectory(fullPath());
- return DirectoryEntrySync::create(m_fileSystem, parentPath);
+ return FileSystemDirectoryEntrySync::create(m_fileSystem, parentPath);
}
-EntrySync::EntrySync(DOMFileSystemBase* fileSystem, const String& fullPath)
- : EntryBase(fileSystem, fullPath) {}
+FileSystemEntrySync::FileSystemEntrySync(FileSystemBase* fileSystem,
+ const String& fullPath)
+ : FileSystemEntryBase(fileSystem, fullPath) {}
-DEFINE_TRACE(EntrySync) {
- EntryBase::trace(visitor);
+DEFINE_TRACE(FileSystemEntrySync) {
+ FileSystemEntryBase::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698