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

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

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/fileapi/Blob.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fileapi/File.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/File.cpp b/third_party/WebKit/Source/core/fileapi/File.cpp
index 5da36bdea9cb5feafd6d78fb6e0b578c715b9e0c..0270ccae89517989bc9f770ef417b0317e2c679c 100644
--- a/third_party/WebKit/Source/core/fileapi/File.cpp
+++ b/third_party/WebKit/Source/core/fileapi/File.cpp
@@ -59,7 +59,7 @@ static PassOwnPtr<BlobData> createBlobDataForFileWithType(const String& path, co
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
blobData->appendFile(path);
- return blobData.release();
+ return blobData;
}
static PassOwnPtr<BlobData> createBlobDataForFile(const String& path, File::ContentTypeLookupPolicy policy)
@@ -77,7 +77,7 @@ static PassOwnPtr<BlobData> createBlobDataForFileWithMetadata(const String& file
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(getContentTypeFromFileName(fileSystemName, File::WellKnownContentTypes));
blobData->appendFile(metadata.platformPath, 0, metadata.length, metadata.modificationTime / msPerSecond);
- return blobData.release();
+ return blobData;
}
static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSystemURL, const FileMetadata& metadata)
@@ -85,7 +85,7 @@ static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste
OwnPtr<BlobData> blobData = BlobData::create();
blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), File::WellKnownContentTypes));
blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.modificationTime / msPerSecond);
- return blobData.release();
+ return blobData;
}
// static
@@ -112,7 +112,7 @@ File* File::create(ExecutionContext* context, const HeapVector<ArrayBufferOrArra
populateBlobData(blobData.get(), fileBits, normalizeLineEndingsToNative);
long long fileSize = blobData->length();
- return File::create(fileName, lastModified, BlobDataHandle::create(blobData.release(), fileSize));
+ return File::create(fileName, lastModified, BlobDataHandle::create(std::move(blobData), fileSize));
}
File* File::createWithRelativePath(const String& path, const String& relativePath)
@@ -285,7 +285,7 @@ Blob* File::slice(long long start, long long end, const String& contentType, Exc
ASSERT(!m_path.isEmpty());
blobData->appendFile(m_path, start, length, modificationTimeMS / msPerSecond);
}
- return Blob::create(BlobDataHandle::create(blobData.release(), length));
+ return Blob::create(BlobDataHandle::create(std::move(blobData), length));
}
void File::captureSnapshot(long long& snapshotSize, double& snapshotModificationTimeMS) const
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/Blob.cpp ('k') | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698