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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp

Issue 2494333002: Replace wrapUnique(new T(args)) by makeUnique<T>(args) in Blink (Closed)
Patch Set: Drop redundant WTF:: Created 4 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
Index: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp
index aba6aadee56b5443b197e0549ac9da8e8bafe3a6..8e6da23ef17ebce97f64338ccb305026f2e84624 100644
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp
@@ -89,7 +89,7 @@ void readYUV(size_t maxDecodedBytes,
// Setting a dummy ImagePlanes object signals to the decoder that we want to
// do YUV decoding.
- std::unique_ptr<ImagePlanes> dummyImagePlanes = wrapUnique(new ImagePlanes());
+ std::unique_ptr<ImagePlanes> dummyImagePlanes = makeUnique<ImagePlanes>();
decoder->setImagePlanes(std::move(dummyImagePlanes));
bool sizeIsAvailable = decoder->isSizeAvailable();
@@ -125,7 +125,7 @@ void readYUV(size_t maxDecodedBytes,
planes[2] = ((char*)planes[1]) + rowBytes[1] * uSize.height();
std::unique_ptr<ImagePlanes> imagePlanes =
- wrapUnique(new ImagePlanes(planes, rowBytes));
+ makeUnique<ImagePlanes>(planes, rowBytes);
decoder->setImagePlanes(std::move(imagePlanes));
ASSERT_TRUE(decoder->decodeToYUV());
@@ -263,7 +263,7 @@ TEST(JPEGImageDecoderTest, yuv) {
std::unique_ptr<ImageDecoder> decoder = createDecoder(230 * 230 * 4);
decoder->setData(data.get(), true);
- std::unique_ptr<ImagePlanes> imagePlanes = wrapUnique(new ImagePlanes());
+ std::unique_ptr<ImagePlanes> imagePlanes = makeUnique<ImagePlanes>();
decoder->setImagePlanes(std::move(imagePlanes));
ASSERT_TRUE(decoder->isSizeAvailable());
ASSERT_FALSE(decoder->canDecodeToYUV());

Powered by Google App Engine
This is Rietveld 408576698