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

Unified Diff: ipc/test_util_mac.cc

Issue 1421933002: Revert of mac: Add auto-close and share-read-only functionality to SharedMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « ipc/test_util_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/test_util_mac.cc
diff --git a/ipc/test_util_mac.cc b/ipc/test_util_mac.cc
index 5e26e1f78f4f1f7e5c9686325717cf3d21e81f2a..4639b13babe9f90ab8fd524c7d390c53b973797c 100644
--- a/ipc/test_util_mac.cc
+++ b/ipc/test_util_mac.cc
@@ -4,7 +4,6 @@
#include "ipc/test_util_mac.h"
-#include <mach/mach_vm.h>
#include <servers/bootstrap.h>
#include "base/mac/mach_logging.h"
@@ -115,28 +114,4 @@
MACH_CHECK(kr == KERN_SUCCESS, kr) << "GetRefCount";
}
-bool GetMachProtections(void* address, size_t size, int* current, int* max) {
- vm_region_info_t region_info;
- mach_vm_address_t mem_address = reinterpret_cast<mach_vm_address_t>(address);
- mach_vm_size_t mem_size = size;
- vm_region_basic_info_64 basic_info;
-
- region_info = reinterpret_cast<vm_region_recurse_info_t>(&basic_info);
- vm_region_flavor_t flavor = VM_REGION_BASIC_INFO_64;
- memory_object_name_t memory_object;
- mach_port_t ctype;
-
- kern_return_t kr =
- mach_vm_region(mach_task_self(), &mem_address, &mem_size, flavor,
- region_info, &memory_object, &ctype);
- if (kr != KERN_SUCCESS) {
- LOG(ERROR) << "Failed to get region info.";
- return false;
- }
-
- *current = basic_info.protection;
- *max = basic_info.max_protection;
- return true;
-}
-
} // namespace IPC
« no previous file with comments | « ipc/test_util_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698