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

Unified Diff: ui/gfx/codec/jpeg_codec.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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 | « ui/gfx/chromeos/codec/jpeg_codec_robust_slow.cc ('k') | ui/gfx/color_analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/codec/jpeg_codec.cc
diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc
index 79c7d20d881021e83cbc86d9a5940b61d6a911e3..6d926378bec130b53d70bbb510a1287f42b78a08 100644
--- a/ui/gfx/codec/jpeg_codec.cc
+++ b/ui/gfx/codec/jpeg_codec.cc
@@ -6,8 +6,9 @@
#include <setjmp.h>
+#include <memory>
+
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColorPriv.h"
@@ -587,7 +588,8 @@ bool JPEGCodec::Decode(const unsigned char* input, size_t input_size,
output->resize(row_write_stride * cinfo.output_height);
- scoped_ptr<unsigned char[]> row_data(new unsigned char[row_read_stride]);
+ std::unique_ptr<unsigned char[]> row_data(
+ new unsigned char[row_read_stride]);
unsigned char* rowptr = row_data.get();
for (int row = 0; row < static_cast<int>(cinfo.output_height); row++) {
if (!jpeg_read_scanlines(&cinfo, &rowptr, 1))
« no previous file with comments | « ui/gfx/chromeos/codec/jpeg_codec_robust_slow.cc ('k') | ui/gfx/color_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698