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

Unified Diff: sandbox/win/src/win_utils.cc

Issue 84063004: Restructure sandbox code to reduce dependencies pulled in by intercept code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove sandbox re-libification Created 7 years, 1 month 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: sandbox/win/src/win_utils.cc
diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc
index f5c479a35a2cb732e84e970d39544b80829cc706..738efa3f73bb6d7299d87af8b18e1237fe73a230 100644
--- a/sandbox/win/src/win_utils.cc
+++ b/sandbox/win/src/win_utils.cc
@@ -276,26 +276,6 @@ bool GetNtPathFromWin32Path(const std::wstring& path, std::wstring* nt_path) {
return rv;
}
-bool WriteProtectedChildMemory(HANDLE child_process, void* address,
- const void* buffer, size_t length) {
- // First, remove the protections.
- DWORD old_protection;
- if (!::VirtualProtectEx(child_process, address, length,
- PAGE_WRITECOPY, &old_protection))
- return false;
-
- SIZE_T written;
- bool ok = ::WriteProcessMemory(child_process, address, buffer, length,
- &written) && (length == written);
-
- // Always attempt to restore the original protection.
- if (!::VirtualProtectEx(child_process, address, length,
- old_protection, &old_protection))
- return false;
-
- return ok;
-}
-
}; // namespace sandbox
// TODO(jschuh): http://crbug.com/11789
« sandbox/win/src/service_resolver_32.cc ('K') | « sandbox/win/src/target_interceptions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698