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

Unified Diff: sandbox/win/src/win_utils.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/top_level_dispatcher.cc ('k') | sandbox/win/src/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/win_utils.cc
diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc
index ef4d803ab6d94c142f88e60b928d930542697503..178fd91592579f37caa8a719b562775c5d59d6d4 100644
--- a/sandbox/win/src/win_utils.cc
+++ b/sandbox/win/src/win_utils.cc
@@ -7,9 +7,9 @@
#include <stddef.h>
#include <map>
+#include <memory>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_util.h"
#include "base/win/pe_image.h"
#include "sandbox/win/src/internal_types.h"
@@ -294,7 +294,7 @@ bool ConvertToLongPath(base::string16* path) {
}
DWORD size = MAX_PATH;
- scoped_ptr<wchar_t[]> long_path_buf(new wchar_t[size]);
+ std::unique_ptr<wchar_t[]> long_path_buf(new wchar_t[size]);
DWORD return_value = ::GetLongPathName(temp_path.c_str(), long_path_buf.get(),
size);
@@ -355,7 +355,7 @@ bool GetPathFromHandle(HANDLE handle, base::string16* path) {
NTSTATUS status = NtQueryObject(handle, ObjectNameInformation, name, size,
&size);
- scoped_ptr<BYTE[]> name_ptr;
+ std::unique_ptr<BYTE[]> name_ptr;
if (size) {
name_ptr.reset(new BYTE[size]);
name = reinterpret_cast<OBJECT_NAME_INFORMATION*>(name_ptr.get());
« no previous file with comments | « sandbox/win/src/top_level_dispatcher.cc ('k') | sandbox/win/src/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698