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

Unified Diff: sandbox/win/src/handle_closer.cc

Issue 1849323003: Convert //sandbox to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup nonsfi_sandbox_unittest.cc 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 | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/interception.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/handle_closer.cc
diff --git a/sandbox/win/src/handle_closer.cc b/sandbox/win/src/handle_closer.cc
index 962e4411ffd05daa1d53586099a98d56174aef94..038cae98f88ca8cea6cf45ddb887a8f26a5a9657 100644
--- a/sandbox/win/src/handle_closer.cc
+++ b/sandbox/win/src/handle_closer.cc
@@ -6,9 +6,10 @@
#include <stddef.h>
+#include <memory>
+
#include "base/logging.h"
#include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
#include "base/win/windows_version.h"
#include "sandbox/win/src/interceptors.h"
#include "sandbox/win/src/internal_types.h"
@@ -96,7 +97,7 @@ bool HandleCloser::InitializeTargetHandles(TargetProcess* target) {
return true;
size_t bytes_needed = GetBufferSize();
- scoped_ptr<size_t[]> local_buffer(
+ std::unique_ptr<size_t[]> local_buffer(
new size_t[bytes_needed / sizeof(size_t)]);
if (!SetupHandleList(local_buffer.get(), bytes_needed))
@@ -175,7 +176,7 @@ bool GetHandleName(HANDLE handle, base::string16* handle_name) {
ResolveNTFunctionPtr("NtQueryObject", &QueryObject);
ULONG size = MAX_PATH;
- scoped_ptr<UNICODE_STRING, base::FreeDeleter> name;
+ std::unique_ptr<UNICODE_STRING, base::FreeDeleter> name;
NTSTATUS result;
do {
« no previous file with comments | « sandbox/win/src/broker_services.cc ('k') | sandbox/win/src/interception.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698