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

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

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 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 | « sandbox/win/src/resolver.h ('k') | sandbox/win/src/resolver_32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/resolver.cc
diff --git a/sandbox/win/src/resolver.cc b/sandbox/win/src/resolver.cc
deleted file mode 100644
index d1719da51a57eaadd78a7b160817c942fbcab7b1..0000000000000000000000000000000000000000
--- a/sandbox/win/src/resolver.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "sandbox/win/src/resolver.h"
-
-#include <stddef.h>
-
-#include "base/win/pe_image.h"
-#include "sandbox/win/src/sandbox_nt_util.h"
-
-namespace sandbox {
-
-NTSTATUS ResolverThunk::Init(const void* target_module,
- const void* interceptor_module,
- const char* target_name,
- const char* interceptor_name,
- const void* interceptor_entry_point,
- void* thunk_storage,
- size_t storage_bytes) {
- if (NULL == thunk_storage || 0 == storage_bytes ||
- NULL == target_module || NULL == target_name)
- return STATUS_INVALID_PARAMETER;
-
- if (storage_bytes < GetThunkSize())
- return STATUS_BUFFER_TOO_SMALL;
-
- NTSTATUS ret = STATUS_SUCCESS;
- if (NULL == interceptor_entry_point) {
- ret = ResolveInterceptor(interceptor_module, interceptor_name,
- &interceptor_entry_point);
- if (!NT_SUCCESS(ret))
- return ret;
- }
-
- ret = ResolveTarget(target_module, target_name, &target_);
- if (!NT_SUCCESS(ret))
- return ret;
-
- interceptor_ = interceptor_entry_point;
-
- return ret;
-}
-
-NTSTATUS ResolverThunk::ResolveInterceptor(const void* interceptor_module,
- const char* interceptor_name,
- const void** address) {
- DCHECK_NT(address);
- if (!interceptor_module)
- return STATUS_INVALID_PARAMETER;
-
- base::win::PEImage pe(interceptor_module);
- if (!pe.VerifyMagic())
- return STATUS_INVALID_IMAGE_FORMAT;
-
- *address = pe.GetProcAddress(interceptor_name);
-
- if (!(*address))
- return STATUS_PROCEDURE_NOT_FOUND;
-
- return STATUS_SUCCESS;
-}
-
-} // namespace sandbox
« no previous file with comments | « sandbox/win/src/resolver.h ('k') | sandbox/win/src/resolver_32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698