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

Unified Diff: sandbox/win/src/broker_services.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/app_container_unittest.cc ('k') | sandbox/win/src/handle_closer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/broker_services.cc
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index 26b2561021dc2f32d9395aac7244990f56c84b22..838d494681271cdac67f82e35252e32ac33fe5a4 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -6,11 +6,12 @@
#include <AclAPI.h>
#include <stddef.h>
+
+#include <memory>
#include <utility>
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/threading/platform_thread.h"
#include "base/win/scoped_handle.h"
@@ -474,7 +475,8 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path,
// the job object generates notifications using the completion port.
policy_base->AddRef();
if (job.IsValid()) {
- scoped_ptr<JobTracker> tracker(new JobTracker(std::move(job), policy_base));
+ std::unique_ptr<JobTracker> tracker(
+ new JobTracker(std::move(job), policy_base));
// There is no obvious recovery after failure here. Previous version with
// SpawnCleanup() caused deletion of TargetProcess twice. crbug.com/480639
@@ -524,8 +526,8 @@ VOID CALLBACK BrokerServicesBase::RemovePeer(PVOID parameter, BOOLEAN timeout) {
}
ResultCode BrokerServicesBase::AddTargetPeer(HANDLE peer_process) {
- scoped_ptr<PeerTracker> peer(new PeerTracker(::GetProcessId(peer_process),
- job_port_.Get()));
+ std::unique_ptr<PeerTracker> peer(
+ new PeerTracker(::GetProcessId(peer_process), job_port_.Get()));
if (!peer->id)
return SBOX_ERROR_GENERIC;
« no previous file with comments | « sandbox/win/src/app_container_unittest.cc ('k') | sandbox/win/src/handle_closer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698