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

Unified Diff: base/memory/shared_memory_android.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 | « base/memory/shared_memory.h ('k') | base/memory/shared_memory_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_android.cc
diff --git a/base/memory/shared_memory_android.cc b/base/memory/shared_memory_android.cc
index ad9145fcdf1033a7429625aca56318c759253b20..da3c5953f044c8ca861427f7cecfd3661b60f930 100644
--- a/base/memory/shared_memory_android.cc
+++ b/base/memory/shared_memory_android.cc
@@ -42,7 +42,8 @@ bool SharedMemory::Create(const SharedMemoryCreateOptions& options) {
// Android doesn't appear to have a way to drop write access on an ashmem
// segment for a single descriptor. http://crbug.com/320865
- readonly_shm_ = SharedMemoryHandle::ImportHandle(dup(shm_.GetHandle()));
+ readonly_shm_ = SharedMemoryHandle(
+ base::FileDescriptor(dup(shm_.GetHandle()), false), shm_.GetGUID());
if (!readonly_shm_.IsValid()) {
DPLOG(ERROR) << "dup() failed";
return false;
« no previous file with comments | « base/memory/shared_memory.h ('k') | base/memory/shared_memory_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698