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

Unified Diff: Source/modules/filesystem/HTMLInputElementFileSystem.cpp

Issue 22436002: Replace EntryArray type by an Entry[] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 4 months 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: Source/modules/filesystem/HTMLInputElementFileSystem.cpp
diff --git a/Source/modules/filesystem/HTMLInputElementFileSystem.cpp b/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
index c5d797a7c2be1a2555c534c9f5493d8ef22d0126..9bb9c8c79ce69dd4ba99c145026b8b29b562a50e 100644
--- a/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
+++ b/Source/modules/filesystem/HTMLInputElementFileSystem.cpp
@@ -38,24 +38,24 @@
#include "modules/filesystem/DOMFilePath.h"
#include "modules/filesystem/DOMFileSystem.h"
#include "modules/filesystem/DirectoryEntry.h"
-#include "modules/filesystem/EntryArray.h"
+#include "modules/filesystem/Entry.h"
#include "modules/filesystem/FileEntry.h"
namespace WebCore {
// static
-PassRefPtr<EntryArray> HTMLInputElementFileSystem::webkitEntries(ScriptExecutionContext* scriptExecutionContext, HTMLInputElement* input)
+EntryVector HTMLInputElementFileSystem::webkitEntries(ScriptExecutionContext* scriptExecutionContext, HTMLInputElement* input)
{
- RefPtr<EntryArray> array = EntryArray::create();
+ EntryVector entries;
FileList* files = input->files();
if (!files)
- return array;
+ return entries;
RefPtr<DOMFileSystem> filesystem = DOMFileSystem::createIsolatedFileSystem(scriptExecutionContext, input->droppedFileSystemId());
if (!filesystem) {
// Drag-drop isolated filesystem is not available.
- return array;
+ return entries;
}
for (unsigned i = 0; i < files->length(); ++i) {
@@ -69,11 +69,11 @@ PassRefPtr<EntryArray> HTMLInputElementFileSystem::webkitEntries(ScriptExecution
// The dropped entries are mapped as top-level entries in the isolated filesystem.
String virtualPath = DOMFilePath::append("/", file->name());
if (metadata.type == FileMetadata::TypeDirectory)
- array->append(DirectoryEntry::create(filesystem, virtualPath));
+ entries.append(DirectoryEntry::create(filesystem, virtualPath));
else
- array->append(FileEntry::create(filesystem, virtualPath));
+ entries.append(FileEntry::create(filesystem, virtualPath));
}
- return array;
+ return entries;
}
HTMLInputElementFileSystem::HTMLInputElementFileSystem()
« no previous file with comments | « Source/modules/filesystem/HTMLInputElementFileSystem.h ('k') | Source/modules/filesystem/HTMLInputElementFileSystem.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698