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

Unified Diff: base/memory/shared_memory.h

Issue 1143243007: Extract some logic from transport_dib into shared_memory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inverted conditional. Created 5 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 | « no previous file | base/memory/shared_memory_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index 692ccf8a67cf6fbbce1dcc7682a1a347c254aba7..e288058942bd35f6cae7ba798c9b94ec80d43d53 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -130,6 +130,12 @@ class BASE_EXPORT SharedMemory {
bool clean_up_resources_on_destruction);
#endif
+#if defined(OS_POSIX) && !defined(OS_ANDROID)
+ // Returns the size of the shared memory region referred to by |handle|.
+ // Returns '-1' on a failure to determine the size.
+ static int GetSizeFromSharedMemoryHandle(const SharedMemoryHandle& handle);
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID)
+
// Creates a shared memory object as described by the options struct.
// Returns true on success and false on failure.
bool Create(const SharedMemoryCreateOptions& options);
« no previous file with comments | « no previous file | base/memory/shared_memory_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698