Index: base/memory/shared_memory.h |
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h |
index 4b66cc6edd2c61ab12d28a00e3b0d8a53daad877..952deec5f60f7aa0fdac26a99e2f2467efd831b6 100644 |
--- a/base/memory/shared_memory.h |
+++ b/base/memory/shared_memory.h |
@@ -265,9 +265,22 @@ class BASE_EXPORT SharedMemory { |
} |
}; |
- // Returns a unique ID for this shared memory's handle. Note this function may |
+ // Returns a unique ID for the shared memory |handle|. Note this function may |
// access file system and be slow. |
- bool GetUniqueId(UniqueId* id) const; |
+ static bool GetUniqueId(const SharedMemoryHandle& handle, UniqueId* id); |
+#else |
+ // TODO(hajimehoshi): On platforms other than POSIX, UniqueId and its getter |
+ // are work in progress. |
+ using UniqueId = int; |
+ |
+ struct UniqueIdHash { |
+ size_t operator()(const UniqueId& id) const { return id; } |
+ }; |
+ |
+ static bool GetUniqueId(const SharedMemoryHandle& handle, UniqueId* id) { |
+ *id = 0; |
+ return true; |
+ } |
#endif |
private: |