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

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

Issue 100023005: Make cloning of File objects more useful. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reupload Created 7 years 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') | public/web/WebSerializedScriptValueVersion.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 52c627755b07a563968778c8c7110b91f8b47622..16a810ae833edfa3cd298aeddcec632d0dbf18dd 100644
--- a/Source/core/fileapi/File.cpp
+++ b/Source/core/fileapi/File.cpp
@@ -113,18 +113,16 @@ File::File(const String& path, const String& name, ContentTypeLookupPolicy polic
ScriptWrappable::init(this);
}
-File::File(const String& path, PassRefPtr<BlobDataHandle> blobDataHandle)
+File::File(const String& path, const String& name, const String& relativePath, bool hasSnaphotData, uint64_t size, double lastModified, PassRefPtr<BlobDataHandle> blobDataHandle)
: Blob(blobDataHandle)
- , m_hasBackingFile(true)
+ , m_hasBackingFile(!path.isEmpty() || !relativePath.isEmpty())
, m_path(path)
- , m_name(blink::Platform::current()->fileUtilities()->baseName(path))
- , m_snapshotSize(-1)
- , m_snapshotModificationTime(invalidFileTime())
+ , m_name(name)
+ , m_snapshotSize(hasSnaphotData ? static_cast<long long>(size) : -1)
+ , m_snapshotModificationTime(hasSnaphotData ? lastModified : invalidFileTime())
+ , m_relativePath(relativePath)
{
ScriptWrappable::init(this);
- // FIXME: File object serialization/deserialization does not include
- // newer file object data members: m_name and m_relativePath.
- // See SerializedScriptValue.cpp.
}
File::File(const String& name, double modificationTime, PassRefPtr<BlobDataHandle> blobDataHandle)
« no previous file with comments | « Source/core/fileapi/File.h ('k') | public/web/WebSerializedScriptValueVersion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698