summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 11:16:35 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 11:16:35 +0000
commit6cbf73ffc21a558a99214bff8b405f1990bb0639 (patch)
treef2c00f76dcdd93bb7094c2f206f254fb31e01d25 /sandbox
parent7ed37ccddc5a9cb8692293df960f7f616da86c81 (diff)
downloadchromium_src-6cbf73ffc21a558a99214bff8b405f1990bb0639.zip
chromium_src-6cbf73ffc21a558a99214bff8b405f1990bb0639.tar.gz
chromium_src-6cbf73ffc21a558a99214bff8b405f1990bb0639.tar.bz2
Expose an IsSandboxed() export on chrome.exe.
BUG=329023 Review URL: https://codereview.chromium.org/159283004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/win/src/sandbox.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sandbox/win/src/sandbox.cc b/sandbox/win/src/sandbox.cc
index d26daa4..984dfec 100644
--- a/sandbox/win/src/sandbox.cc
+++ b/sandbox/win/src/sandbox.cc
@@ -12,8 +12,7 @@
namespace sandbox {
// The section for IPC and policy.
SANDBOX_INTERCEPT HANDLE g_shared_section;
-
-static bool s_is_broker = false;
+static bool s_is_broker = false;
// GetBrokerServices: the current implementation relies on a shared section
// that is created by the broker and opened by the target.
@@ -42,3 +41,8 @@ TargetServices* SandboxFactory::GetTargetServices() {
}
} // namespace sandbox
+
+// Allows querying for whether the current process has been sandboxed.
+extern "C" bool __declspec(dllexport) IsSandboxedProcess() {
+ return sandbox::g_shared_section != NULL;
+}