summaryrefslogtreecommitdiffstats
path: root/chrome_elf
diff options
context:
space:
mode:
authorcaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 02:54:51 +0000
committercaitkp@chromium.org <caitkp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-09 02:54:51 +0000
commita869776abbe932cc88af0fd42a6583276c356612 (patch)
tree7c70642b6860462bcea9625b43b781af3628ec6a /chrome_elf
parentf0605523503e2917c98a79c5810e1962d32cd5ec (diff)
downloadchromium_src-a869776abbe932cc88af0fd42a6583276c356612.zip
chromium_src-a869776abbe932cc88af0fd42a6583276c356612.tar.gz
chromium_src-a869776abbe932cc88af0fd42a6583276c356612.tar.bz2
Make sure we only redirect in browser processes
BUG=334379 Review URL: https://codereview.chromium.org/137103009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_elf')
-rw-r--r--chrome_elf/create_file/chrome_create_file.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome_elf/create_file/chrome_create_file.cc b/chrome_elf/create_file/chrome_create_file.cc
index f1cd599..b6744f3 100644
--- a/chrome_elf/create_file/chrome_create_file.cc
+++ b/chrome_elf/create_file/chrome_create_file.cc
@@ -249,6 +249,11 @@ bool IsCanary(LPWSTR exe_path) {
}
bool ShouldBypass(LPCWSTR file_path) {
+ // Do not redirect in non-browser processes.
+ wchar_t* command_line = ::GetCommandLine();
+ if (command_line && wcsstr(command_line, L"--type"))
+ return false;
+
// If the shell functions are not present, forward the call to kernel32.
if (!PopulateShellFunctions())
return false;