Index: Source/core/fileapi/File.cpp |
diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp |
index 120954f463f504ab2e88b270d636368b22c9a0c4..795aa491a9a7f618723e33caa6c0f64c9c3b8c9e 100644 |
--- a/Source/core/fileapi/File.cpp |
+++ b/Source/core/fileapi/File.cpp |
@@ -296,4 +296,21 @@ void File::appendTo(BlobData& blobData) const |
blobData.appendFile(m_path, 0, size, modificationTime); |
} |
+bool File::hasSameSource(const File& other) const |
+{ |
+ if (m_hasBackingFile != other.m_hasBackingFile) |
+ return false; |
+ |
+ if (m_hasBackingFile) |
+ return m_path == other.m_path; |
+ |
+ if (m_fileSystemURL.isEmpty() != other.m_fileSystemURL.isEmpty()) |
+ return false; |
+ |
+ if (!m_fileSystemURL.isEmpty()) |
+ return m_fileSystemURL == other.m_fileSystemURL; |
+ |
+ return uuid() == other.uuid(); |
+} |
+ |
} // namespace blink |