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

Unified Diff: Source/core/fileapi/File.cpp

Issue 564963002: New FormData methods: get, getAll, has, set, delete and iterable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Stuff new methods behind a flag Created 6 years, 3 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/core/fileapi/File.cpp
diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
index 3297989c4bdd6b47869f2778b19502308d895d66..6a2a1918d9a5ee39cbe52d8536d7ad04a9f72cf0 100644
--- a/Source/core/fileapi/File.cpp
+++ b/Source/core/fileapi/File.cpp
@@ -159,6 +159,27 @@ File::File(const KURL& fileSystemURL, const FileMetadata& metadata)
{
}
+File::File(const File& other)
+ : Blob(other.blobDataHandle())
+ , m_hasBackingFile(other.m_hasBackingFile)
+ , m_userVisibility(other.m_userVisibility)
+ , m_path(other.m_path)
+ , m_name(other.m_name)
+ , m_fileSystemURL(other.m_fileSystemURL)
+ , m_snapshotSize(other.m_snapshotSize)
+ , m_snapshotModificationTime(other.m_snapshotModificationTime)
+ , m_relativePath(other.m_relativePath)
+{
+}
+
+PassRefPtrWillBeRawPtr<File> File::clone(const String& name) const
+{
+ RefPtrWillBeRawPtr<File> file = adoptRefWillBeNoop(new File(*this));
+ if (!name.isNull())
+ file->m_name = name;
+ return file.release();
+}
+
double File::lastModifiedMS() const
{
if (hasValidSnapshotMetadata() && isValidFileTime(m_snapshotModificationTime))

Powered by Google App Engine
This is Rietveld 408576698