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

Unified Diff: mojo/edk/system/platform_wrapper_unittest.cc

Issue 2859843002: Add a GUID to base::SharedMemoryHandle. (Closed)
Patch Set: fix guid on android. Created 3 years, 7 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 | « mojo/edk/embedder/platform_shared_buffer.cc ('k') | mojo/public/cpp/system/platform_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/platform_wrapper_unittest.cc
diff --git a/mojo/edk/system/platform_wrapper_unittest.cc b/mojo/edk/system/platform_wrapper_unittest.cc
index c049fa327f2e77831e41c75cfb065e8298afeeb5..1719c9d187d8fb62966da745b569d531a27c2c8d 100644
--- a/mojo/edk/system/platform_wrapper_unittest.cc
+++ b/mojo/edk/system/platform_wrapper_unittest.cc
@@ -161,18 +161,20 @@ DEFINE_TEST_CLIENT_TEST_WITH_PIPE(ReadPlatformSharedBuffer, PlatformWrapperTest,
bool read_only = flags & MOJO_PLATFORM_SHARED_BUFFER_HANDLE_FLAG_NONE;
EXPECT_FALSE(read_only);
+ // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763.
+ base::UnguessableToken guid = base::UnguessableToken::Create();
#if defined(OS_MACOSX) && !defined(OS_IOS)
ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_MACH_PORT, os_buffer.type);
base::SharedMemoryHandle memory_handle(
- static_cast<mach_port_t>(os_buffer.value), size);
+ static_cast<mach_port_t>(os_buffer.value), size, guid);
#elif defined(OS_POSIX)
ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_FILE_DESCRIPTOR, os_buffer.type);
base::SharedMemoryHandle memory_handle(
- base::FileDescriptor(static_cast<int>(os_buffer.value), false));
+ base::FileDescriptor(static_cast<int>(os_buffer.value), false), guid);
#elif defined(OS_WIN)
ASSERT_EQ(MOJO_PLATFORM_HANDLE_TYPE_WINDOWS_HANDLE, os_buffer.type);
base::SharedMemoryHandle memory_handle(
- reinterpret_cast<HANDLE>(os_buffer.value));
+ reinterpret_cast<HANDLE>(os_buffer.value), guid);
#endif
base::SharedMemory memory(memory_handle, read_only);
« no previous file with comments | « mojo/edk/embedder/platform_shared_buffer.cc ('k') | mojo/public/cpp/system/platform_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698