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

Unified Diff: gpu/ipc/service/gpu_channel_test_common.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Rebase. 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
Index: gpu/ipc/service/gpu_channel_test_common.cc
diff --git a/gpu/ipc/service/gpu_channel_test_common.cc b/gpu/ipc/service/gpu_channel_test_common.cc
index e00248c3c13d48c73149edea560c0e88c898f07f..f25e0c6a3b402c7a423f1e2aa0eb7673153a5db2 100644
--- a/gpu/ipc/service/gpu_channel_test_common.cc
+++ b/gpu/ipc/service/gpu_channel_test_common.cc
@@ -155,9 +155,7 @@ void GpuChannelTestCommon::HandleMessage(GpuChannel* channel,
base::SharedMemoryHandle GpuChannelTestCommon::GetSharedHandle() {
Nico 2017/05/02 20:08:00 It's weird to have things transferring ownership s
erikchen 2017/05/02 21:33:10 This is a non-virtual method defined in a test cla
base::SharedMemory shared_memory;
shared_memory.CreateAnonymous(10);
- base::SharedMemoryHandle shmem_handle;
- shared_memory.ShareToProcess(base::GetCurrentProcessHandle(), &shmem_handle);
- return shmem_handle;
+ return shared_memory.handle().Duplicate();
}
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698