Index: base/memory/shared_memory_mac.cc |
diff --git a/base/memory/shared_memory_mac.cc b/base/memory/shared_memory_mac.cc |
index 61ebf89aa1540c8f646af5b79b31618b124432a3..cdf0bc9fefa4eb60fd4333abdfd66c64b1009b89 100644 |
--- a/base/memory/shared_memory_mac.cc |
+++ b/base/memory/shared_memory_mac.cc |
@@ -53,7 +53,7 @@ |
group = SharedMemoryHandle::POSIX; |
found_group = true; |
} else { |
- group = SharedMemoryHandle::POSIX; |
+ group = SharedMemoryHandle::MACH; |
} |
return group; |
@@ -175,10 +175,20 @@ |
} // namespace |
SharedMemoryCreateOptions::SharedMemoryCreateOptions() |
- : type(SharedMemoryHandle::POSIX), |
+ : type(SharedMemoryHandle::MACH), |
size(0), |
executable(false), |
- share_read_only(false) {} |
+ share_read_only(false) { |
+ if (mac::IsOSLionOrLater()) { |
+ // A/B test the mechanism. Once the experiment is over, this will always be |
+ // set to SharedMemoryHandle::MACH. |
+ // http://crbug.com/547261 |
+ type = GetABTestMechanism(); |
+ } else { |
+ // Mach shared memory isn't supported on OSX 10.6 or older. |
+ type = SharedMemoryHandle::POSIX; |
+ } |
+} |
SharedMemory::SharedMemory() |
: mapped_memory_mechanism_(SharedMemoryHandle::POSIX), |
@@ -263,22 +273,6 @@ |
return Create(options); |
} |
-bool SharedMemory::CreateAndMapAnonymousMach(size_t size) { |
- SharedMemoryCreateOptions options; |
- |
- if (mac::IsOSLionOrLater()) { |
- // A/B test the mechanism. Once the experiment is over, this will always be |
- // set to SharedMemoryHandle::MACH. |
- // http://crbug.com/547261 |
- options.type = GetABTestMechanism(); |
- } else { |
- // Mach shared memory isn't supported on OSX 10.6 or older. |
- options.type = SharedMemoryHandle::POSIX; |
- } |
- options.size = size; |
- return Create(options) && Map(size); |
-} |
- |
// static |
bool SharedMemory::GetSizeFromSharedMemoryHandle( |
const SharedMemoryHandle& handle, |