Index: base/memory/shared_memory.h |
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h |
index c4b4cdb64430d6fd4869711b3a000c8b8dcf7e8f..07bd44ea7a438f00c01e3badfe08b1513bbe755c 100644 |
--- a/base/memory/shared_memory.h |
+++ b/base/memory/shared_memory.h |
@@ -127,6 +127,9 @@ class BASE_EXPORT SharedMemory { |
static int GetFdFromSharedMemoryHandle(const SharedMemoryHandle& handle); |
#endif |
+ int importance() const { return importance_; } |
+ void set_importance(int importance) { importance_ = importance; } |
+ |
// Creates a shared memory object as described by the options struct. |
// Returns true on success and false on failure. |
bool Create(const SharedMemoryCreateOptions& options); |
@@ -226,21 +229,6 @@ 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 |
- |
// Returns the last error encountered as a result of a call to Create() or |
// Map(). Note: Currently only errors from Mac POSIX shared memory |
// implementation are fully instrumented. |
@@ -279,6 +267,7 @@ class BASE_EXPORT SharedMemory { |
bool read_only_ = false; |
size_t requested_size_ = 0; |
SharedMemoryError last_error_ = SharedMemoryError::NO_ERRORS; |
+ int importance_ = 0; |
DISALLOW_COPY_AND_ASSIGN(SharedMemory); |
}; |