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

Unified Diff: ppapi/proxy/video_encoder_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 | « ppapi/proxy/video_decoder_resource_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/video_encoder_resource_unittest.cc
diff --git a/ppapi/proxy/video_encoder_resource_unittest.cc b/ppapi/proxy/video_encoder_resource_unittest.cc
index a49379b912dcbc65b5c15d4a7f5e89647d5ee804..5dc29c26d3aa7d61181fd7d9f4434ba3527eef9a 100644
--- a/ppapi/proxy/video_encoder_resource_unittest.cc
+++ b/ppapi/proxy/video_encoder_resource_unittest.cc
@@ -292,10 +292,8 @@ class VideoEncoderResourceTest : public PluginProxyTest,
std::vector<SerializedHandle> handles;
for (base::SharedMemory* mem : shared_memory_bitstreams_) {
ASSERT_EQ(mem->requested_size(), buffer_length);
- base::SharedMemoryHandle handle;
-
- ASSERT_TRUE(
- mem->ShareToProcess(base::Process::Current().Handle(), &handle));
+ base::SharedMemoryHandle handle = mem->handle().Duplicate();
+ ASSERT_TRUE(handle.IsValid());
handles.push_back(SerializedHandle(handle, buffer_length));
}
SendReplyWithHandles(
@@ -307,9 +305,9 @@ class VideoEncoderResourceTest : public PluginProxyTest,
uint32_t frame_count,
uint32_t frame_length,
const PP_Size& size) {
- base::SharedMemoryHandle handle;
- ASSERT_TRUE(video_frames_manager_.shm()->ShareToProcess(
- base::Process::Current().Handle(), &handle));
+ base::SharedMemoryHandle handle =
+ video_frames_manager_.shm()->handle().Duplicate();
+ ASSERT_TRUE(handle.IsValid());
SendReplyWithHandle(
params, PP_OK, PpapiPluginMsg_VideoEncoder_GetVideoFramesReply(
frame_count,
« no previous file with comments | « ppapi/proxy/video_decoder_resource_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698