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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
Index: third_party/WebKit/Source/core/fileapi/Blob.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/Blob.cpp b/third_party/WebKit/Source/core/fileapi/Blob.cpp
index 22143b9137b17d7c58121b59c41a82a5091f06b5..57c3b5f1a01d0cf0d25f46d1bdc00625c4f122fa 100644
--- a/third_party/WebKit/Source/core/fileapi/Blob.cpp
+++ b/third_party/WebKit/Source/core/fileapi/Blob.cpp
@@ -38,6 +38,7 @@
#include "core/frame/UseCounter.h"
#include "platform/blob/BlobRegistry.h"
#include "platform/blob/BlobURL.h"
+#include <memory>
namespace blink {
@@ -99,7 +100,7 @@ Blob* Blob::create(ExecutionContext* context, const HeapVector<ArrayBufferOrArra
if (normalizeLineEndingsToNative)
UseCounter::count(context, UseCounter::FileAPINativeLineEndings);
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->setContentType(options.type().lower());
populateBlobData(blobData.get(), blobParts, normalizeLineEndingsToNative);
@@ -112,7 +113,7 @@ Blob* Blob::create(const unsigned char* data, size_t bytes, const String& conten
{
ASSERT(data);
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
blobData->appendBytes(data, bytes);
long long blobSize = blobData->length();
@@ -177,7 +178,7 @@ Blob* Blob::slice(long long start, long long end, const String& contentType, Exc
clampSliceOffsets(size, start, end);
long long length = end - start;
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->setContentType(contentType);
blobData->appendBlob(m_blobDataHandle, start, length);
return Blob::create(BlobDataHandle::create(std::move(blobData), length));
@@ -199,7 +200,7 @@ void Blob::close(ExecutionContext* executionContext, ExceptionState& exceptionSt
// size as zero. Blob and FileReader operations now throws on
// being passed a Blob in that state. Downstream uses of closed Blobs
// (e.g., XHR.send()) consider them as empty.
- OwnPtr<BlobData> blobData = BlobData::create();
+ std::unique_ptr<BlobData> blobData = BlobData::create();
blobData->setContentType(type());
m_blobDataHandle = BlobDataHandle::create(std::move(blobData), 0);
m_isClosed = true;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/TextResource.h ('k') | third_party/WebKit/Source/core/fileapi/File.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698