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

Unified Diff: base/memory/shared_memory.h

Issue 2654073002: base: Introduce SharedMemoryTracker for POSIX (but not macOS) (Closed)
Patch Set: Address on reviews Created 3 years, 11 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: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index 3c68e90a031ff476dd7585b4d6653cc92e7b7643..95d00c0ad769b2ec89ae543d8f07058dafa0a5d0 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -255,6 +255,13 @@ class BASE_EXPORT SharedMemory {
return ShareToProcessCommon(process, new_handle, true, SHARE_CURRENT_MODE);
}
+#if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS)) && \
danakj 2017/01/27 16:56:42 POSIX && (!MACOSX || IOS) && !NACL avoids double n
hajimehoshi 2017/02/07 12:33:44 Done.
+ !defined(OS_NACL)
+ using Id = std::pair<dev_t, ino_t>;
danakj 2017/01/27 16:56:42 I think the type alias just makes use of first/sec
hajimehoshi 2017/02/07 12:33:44 This can be different type among Windows, macOS an
+
+ bool GetUniqueId(Id* id) const;
danakj 2017/01/27 16:56:42 Can you make a comment that this goes to the file
hajimehoshi 2017/02/07 12:33:44 Done.
+#endif
+
private:
#if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \
!(defined(OS_MACOSX) && !defined(OS_IOS))
@@ -301,6 +308,7 @@ class BASE_EXPORT SharedMemory {
DISALLOW_COPY_AND_ASSIGN(SharedMemory);
};
+
} // namespace base
#endif // BASE_MEMORY_SHARED_MEMORY_H_

Powered by Google App Engine
This is Rietveld 408576698