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

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

Issue 640723006: Pass the selected non-native file information from the browser to FileInputType. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed. Created 6 years, 2 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/fileapi/FileTest.cpp » ('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 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
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/core/fileapi/FileTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698