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

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

Issue 57483002: Implement File constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed most feedback. Created 7 years, 1 month 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/Blob.h ('k') | Source/core/fileapi/BlobBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/Blob.cpp
diff --git a/Source/core/fileapi/Blob.cpp b/Source/core/fileapi/Blob.cpp
index 5fda7d84562eff669f4b748acfd0aff96c2bb758..def1ae0cb4b33b427998e57c44801e745ef5bf43 100644
--- a/Source/core/fileapi/Blob.cpp
+++ b/Source/core/fileapi/Blob.cpp
@@ -82,7 +82,7 @@ PassRefPtr<Blob> Blob::slice(long long start, long long end, const String& conte
// The modification time will be used to verify if the file has been changed or not, when the underlying data are accessed.
long long size;
double modificationTime;
- if (isFile()) {
+ if (hasBackingFile()) {
// FIXME: This involves synchronous file operation. We need to figure out how to make it asynchronous.
toFile(this)->captureSnapshot(size, modificationTime);
} else {
@@ -112,7 +112,7 @@ PassRefPtr<Blob> Blob::slice(long long start, long long end, const String& conte
long long length = end - start;
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
- if (isFile()) {
+ if (hasBackingFile()) {
if (!toFile(this)->fileSystemURL().isEmpty())
blobData->appendFileSystemURL(toFile(this)->fileSystemURL(), start, length, modificationTime);
else
« no previous file with comments | « Source/core/fileapi/Blob.h ('k') | Source/core/fileapi/BlobBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698