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

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: webexposed/global-interface-listing updates Created 5 years, 11 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
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/html/DOMFormData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/File.cpp
diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
index 59a2c5eacb361fcfa08d17db24ece202e892ecad..f5d29392e208215be120a23485995820901c4322 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, UserVisibili
{
}
+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)
+{
+}
+
+File* File::clone(const String& name) const
+{
+ File* file = new File(*this);
+ if (!name.isNull())
+ file->m_name = name;
+ return file;
+}
+
double File::lastModifiedMS() const
{
if (hasValidSnapshotMetadata() && isValidFileTime(m_snapshotModificationTime))
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/html/DOMFormData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698