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

Unified Diff: ui/views/corewm/cursor_height_provider_win.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
Index: ui/views/corewm/cursor_height_provider_win.cc
diff --git a/ui/views/corewm/cursor_height_provider_win.cc b/ui/views/corewm/cursor_height_provider_win.cc
index 398b009b71b7312ae30570bc2c9ea284a3b12e97..93a8ceddc52140a6dc0c853e569210d97875aa3c 100644
--- a/ui/views/corewm/cursor_height_provider_win.cc
+++ b/ui/views/corewm/cursor_height_provider_win.cc
@@ -7,14 +7,15 @@
#include <windows.h>
#include <stddef.h>
#include <stdint.h>
+
#include <algorithm>
#include <map>
+#include <memory>
-#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_hdc.h"
namespace {
-using PixelData = scoped_ptr<uint32_t[]>;
+using PixelData = std::unique_ptr<uint32_t[]>;
using HeightStorage = std::map<HCURSOR, int>;
const uint32_t kBitsPeruint32 = sizeof(uint32_t) * 8;
@@ -39,7 +40,7 @@ PixelData GetBitmapData(HBITMAP handle, const BITMAPINFO& info, HDC hdc) {
// When getting pixel data palette is appended to memory pointed by
// BITMAPINFO passed so allocate additional memory to store additional data.
- scoped_ptr<char[]> header(new char[KHeaderAndPalette]);
+ std::unique_ptr<char[]> header(new char[KHeaderAndPalette]);
memcpy(header.get(), &(info.bmiHeader), sizeof(info.bmiHeader));
data.reset(new uint32_t[info.bmiHeader.biSizeImage / sizeof(uint32_t)]);
« no previous file with comments | « ui/views/controls/webview/webview_unittest.cc ('k') | ui/views/corewm/desktop_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698