diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 11:16:35 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-12 11:16:35 +0000 |
commit | 6cbf73ffc21a558a99214bff8b405f1990bb0639 (patch) | |
tree | f2c00f76dcdd93bb7094c2f206f254fb31e01d25 /chrome_elf | |
parent | 7ed37ccddc5a9cb8692293df960f7f616da86c81 (diff) | |
download | chromium_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 'chrome_elf')
-rw-r--r-- | chrome_elf/blacklist/blacklist.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome_elf/blacklist/blacklist.cc b/chrome_elf/blacklist/blacklist.cc index bf48435..ea140c4 100644 --- a/chrome_elf/blacklist/blacklist.cc +++ b/chrome_elf/blacklist/blacklist.cc @@ -138,8 +138,14 @@ class OSInfo { }; bool IsNonBrowserProcess() { - wchar_t* command_line = GetCommandLine(); - return (command_line && wcsstr(command_line, L"--type")); + typedef bool (*IsSandboxedProcessFunc)(); + IsSandboxedProcessFunc is_sandboxed_process = + reinterpret_cast<IsSandboxedProcessFunc>( + GetProcAddress(GetModuleHandle(NULL), "IsSandboxedProcess")); + if (is_sandboxed_process && is_sandboxed_process()) + return true; + + return false; } // Record that the thunk setup completed succesfully and close the registry |