summaryrefslogtreecommitdiffstats
path: root/sandbox/src/sandbox_policy_base.h
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-20 02:44:30 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-20 02:44:30 +0000
commitce4e1b0221cfebad0325137dc5330495775d97c2 (patch)
treea60d872b2796754f2ae5a4717e1d9b4403b9d1f4 /sandbox/src/sandbox_policy_base.h
parent54d80bb02aa71eb957a863109392cd97ea1e2496 (diff)
downloadchromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.zip
chromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.tar.gz
chromium_src-ce4e1b0221cfebad0325137dc5330495775d97c2.tar.bz2
Redo change 2413 that I had to back out before
- CL is identical and was already lgtm TBR=rvargas Review URL: http://codereview.chromium.org/3179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/sandbox_policy_base.h')
-rw-r--r--sandbox/src/sandbox_policy_base.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sandbox/src/sandbox_policy_base.h b/sandbox/src/sandbox_policy_base.h
index 6f89f2a..4b81dbd 100644
--- a/sandbox/src/sandbox_policy_base.h
+++ b/sandbox/src/sandbox_policy_base.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SANDBOX_SRC_SANDBOX_POLICY_BASE_H__
-#define SANDBOX_SRC_SANDBOX_POLICY_BASE_H__
+#ifndef SANDBOX_SRC_SANDBOX_POLICY_BASE_H_
+#define SANDBOX_SRC_SANDBOX_POLICY_BASE_H_
#include <Windows.h>
#include <list>
@@ -80,6 +80,11 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
virtual ResultCode AddRule(SubSystem subsystem, Semantics semantics,
const wchar_t* pattern);
+ virtual ResultCode AddDllToUnload(const wchar_t* dll_name) {
+ blacklisted_dlls_.push_back(std::wstring(dll_name));
+ return SBOX_ALL_OK;
+ }
+
std::wstring GetDesktop() const {
return desktop_;
}
@@ -142,11 +147,13 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
bool file_system_init_;
// Operation mode for the interceptions.
bool relaxed_interceptions_;
+ // The list of dlls to unload in the target process.
+ std::vector<std::wstring> blacklisted_dlls_;
- DISALLOW_EVIL_CONSTRUCTORS(PolicyBase);
+ DISALLOW_COPY_AND_ASSIGN(PolicyBase);
};
} // namespace sandbox
-#endif // SANDBOX_SRC_SANDBOX_POLICY_BASE_H__
+#endif // SANDBOX_SRC_SANDBOX_POLICY_BASE_H_