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

Unified Diff: sandbox/win/src/process_thread_policy.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/process_policy_test.cc ('k') | sandbox/win/src/restricted_token.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/process_thread_policy.cc
diff --git a/sandbox/win/src/process_thread_policy.cc b/sandbox/win/src/process_thread_policy.cc
index 514e7d674f48339949d8c2e8838731ca02aad04f..40b24536e1eea953fb1dbf1e28dc1a6971b29ba6 100644
--- a/sandbox/win/src/process_thread_policy.cc
+++ b/sandbox/win/src/process_thread_policy.cc
@@ -6,10 +6,10 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
#include "sandbox/win/src/ipc_tags.h"
#include "sandbox/win/src/nt_internals.h"
#include "sandbox/win/src/policy_engine_opcodes.h"
@@ -79,7 +79,7 @@ namespace sandbox {
bool ProcessPolicy::GenerateRules(const wchar_t* name,
TargetPolicy::Semantics semantics,
LowLevelPolicy* policy) {
- scoped_ptr<PolicyRule> process;
+ std::unique_ptr<PolicyRule> process;
switch (semantics) {
case TargetPolicy::PROCESS_MIN_EXEC: {
process.reset(new PolicyRule(GIVE_READONLY));
@@ -226,8 +226,8 @@ DWORD ProcessPolicy::CreateProcessWAction(EvalResult eval_result,
STARTUPINFO startup_info = {0};
startup_info.cb = sizeof(startup_info);
- scoped_ptr<wchar_t, base::FreeDeleter>
- cmd_line(_wcsdup(command_line.c_str()));
+ std::unique_ptr<wchar_t, base::FreeDeleter> cmd_line(
+ _wcsdup(command_line.c_str()));
BOOL should_give_full_access = (GIVE_ALLACCESS == eval_result);
if (!CreateProcessExWHelper(client_info.process, should_give_full_access,
« no previous file with comments | « sandbox/win/src/process_policy_test.cc ('k') | sandbox/win/src/restricted_token.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698