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

Unified Diff: ppapi/proxy/video_decoder_resource_unittest.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Compile error. Created 3 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 | « media/gpu/video_encode_accelerator_unittest.cc ('k') | ppapi/proxy/video_encoder_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/video_decoder_resource_unittest.cc
diff --git a/ppapi/proxy/video_decoder_resource_unittest.cc b/ppapi/proxy/video_decoder_resource_unittest.cc
index 8f80d7a71cefb650939d95cf22f6a112eb032c16..66b554e5e7ef17edef41d2a18038e07130a6da5c 100644
--- a/ppapi/proxy/video_decoder_resource_unittest.cc
+++ b/ppapi/proxy/video_decoder_resource_unittest.cc
@@ -147,14 +147,12 @@ class VideoDecoderResourceTest : public PluginProxyTest {
&sink(), PpapiHostMsg_VideoDecoder_GetShm::ID, PP_OK, shm_msg_reply);
sink().AddFilter(&shm_msg_handler);
- std::unique_ptr<base::SharedMemoryHandle> shm_handle;
std::unique_ptr<SerializedHandle> serialized_handle;
base::SharedMemory shm;
if (expected_shm_msg) {
shm.CreateAnonymous(kShmSize);
- shm_handle.reset(new base::SharedMemoryHandle());
- shm.ShareToProcess(base::GetCurrentProcessHandle(), shm_handle.get());
- serialized_handle.reset(new SerializedHandle(*shm_handle, kShmSize));
+ base::SharedMemoryHandle shm_handle = shm.handle().Duplicate();
+ serialized_handle.reset(new SerializedHandle(shm_handle, kShmSize));
shm_msg_handler.set_serialized_handle(serialized_handle.get());
}
« no previous file with comments | « media/gpu/video_encode_accelerator_unittest.cc ('k') | ppapi/proxy/video_encoder_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698