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

Unified Diff: sandbox/win/src/sharedmem_ipc_server.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/service_resolver_unittest.cc ('k') | sandbox/win/src/target_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sharedmem_ipc_server.cc
diff --git a/sandbox/win/src/sharedmem_ipc_server.cc b/sandbox/win/src/sharedmem_ipc_server.cc
index cf2d800e5dd6eb068de8b3428129344ce74d2c2a..672abfacb7a61726bdf925b34152cea2f46cbc0d 100644
--- a/sandbox/win/src/sharedmem_ipc_server.cc
+++ b/sandbox/win/src/sharedmem_ipc_server.cc
@@ -5,9 +5,10 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
+
#include "base/callback.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "sandbox/win/src/crosscall_params.h"
#include "sandbox/win/src/crosscall_server.h"
@@ -175,7 +176,7 @@ bool GetArgs(CrossCallParamsEx* params, IPCParams* ipc_params,
ipc_params->args[i] = type;
switch (type) {
case WCHAR_TYPE: {
- scoped_ptr<base::string16> data(new base::string16);
+ std::unique_ptr<base::string16> data(new base::string16);
if (!params->GetParameterStr(i, data.get())) {
args[i] = 0;
ReleaseArgs(ipc_params, args);
@@ -228,10 +229,8 @@ bool SharedMemIPCServer::InvokeCallback(const ServerControl* service_context,
// Parse, verify and copy the message. The handler operates on a copy
// of the message so the client cannot play dirty tricks by changing the
// data in the channel while the IPC is being processed.
- scoped_ptr<CrossCallParamsEx> params(
- CrossCallParamsEx::CreateFromBuffer(ipc_buffer,
- service_context->channel_size,
- &output_size));
+ std::unique_ptr<CrossCallParamsEx> params(CrossCallParamsEx::CreateFromBuffer(
+ ipc_buffer, service_context->channel_size, &output_size));
if (!params.get())
return false;
« no previous file with comments | « sandbox/win/src/service_resolver_unittest.cc ('k') | sandbox/win/src/target_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698