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

Unified Diff: third_party/WebKit/Source/platform/testing/ImageDecodeBench.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/platform/testing/ImageDecodeBench.cpp
diff --git a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
index a14525d90dff87b031587cba0cfcbc5dad2ccc77..83259b1d8b7146f0900268232dbc98af271cfa61 100644
--- a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
+++ b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
@@ -21,8 +21,9 @@
#include "platform/SharedBuffer.h"
#include "platform/image-decoders/ImageDecoder.h"
#include "public/platform/Platform.h"
-#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
+#include "wtf/PtrUtil.h"
+#include <memory>
#if defined(_WIN32)
#include <mmsystem.h>
@@ -246,7 +247,7 @@ PassRefPtr<SharedBuffer> readFile(const char* fileName)
if (s.st_size <= 0)
return SharedBuffer::create();
- OwnPtr<unsigned char[]> buffer = adoptArrayPtr(new unsigned char[fileSize]);
+ std::unique_ptr<unsigned char[]> buffer = wrapArrayUnique(new unsigned char[fileSize]);
if (fileSize != fread(buffer.get(), 1, fileSize, fp)) {
fprintf(stderr, "Error reading file %s\n", fileName);
exit(2);
@@ -258,7 +259,7 @@ PassRefPtr<SharedBuffer> readFile(const char* fileName)
bool decodeImageData(SharedBuffer* data, bool colorCorrection, size_t packetSize)
{
- OwnPtr<ImageDecoder> decoder = ImageDecoder::create(*data,
+ std::unique_ptr<ImageDecoder> decoder = ImageDecoder::create(*data,
ImageDecoder::AlphaPremultiplied, colorCorrection ?
ImageDecoder::GammaAndColorProfileApplied : ImageDecoder::GammaAndColorProfileIgnored);

Powered by Google App Engine
This is Rietveld 408576698