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

Unified Diff: base/memory/shared_memory.h

Issue 2873433004: Replace SharedMemory::UniqueID usages with SharedMemoryHandle's guid (Closed)
Patch Set: Address on reviews 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
Index: base/memory/shared_memory.h
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h
index 35067e6aaeab848080c681fa729f7853df720f3c..f0234f44faba666a8316431d789c97073c443b91 100644
--- a/base/memory/shared_memory.h
+++ b/base/memory/shared_memory.h
@@ -217,20 +217,9 @@ class BASE_EXPORT SharedMemory {
// failure.
SharedMemoryHandle GetReadOnlyHandle();
-#if defined(OS_POSIX) && (!defined(OS_MACOSX) || defined(OS_IOS)) && \
- !defined(OS_NACL)
- using UniqueId = std::pair<dev_t, ino_t>;
-
- struct UniqueIdHash {
- size_t operator()(const UniqueId& id) const {
- return HashInts(id.first, id.second);
- }
- };
-
- // Returns a unique ID for this shared memory's handle. Note this function may
- // access file system and be slow.
- bool GetUniqueId(UniqueId* id) const;
-#endif
+ // Uniques identifies the shared memory region that the underlying OS resource
+ // points to. This just returns its handler's GUID.
+ base::UnguessableToken GetGUID() const;
erikchen 2017/05/10 20:14:16 Please avoid adding this method to SharedMemory -
hajimehoshi 2017/05/11 10:26:00 Done.
private:
#if defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_ANDROID) && \
« no previous file with comments | « base/BUILD.gn ('k') | base/memory/shared_memory.cc » ('j') | base/memory/shared_memory.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698