summaryrefslogtreecommitdiffstats
path: root/chrome/browser/utility_process_host.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
commit1bd5413c93779467e15c402e5bb1c866792bcac6 (patch)
tree19615d0f974d67abadd8464d188c5a8a02b84fe0 /chrome/browser/utility_process_host.cc
parentd9fac60990a817c7ef7f1a7beef90dc319bf299b (diff)
downloadchromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.zip
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.gz
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.bz2
Disable extensions in incognito mode.
Add a browsertest to make sure we don't crash with an incognito window open. Had to finagle utility_process_host to make it work in a browsertest. BUG=12326 TEST=none Review URL: http://codereview.chromium.org/118476 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/utility_process_host.cc')
-rw-r--r--chrome/browser/utility_process_host.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc
index 2be419e..5dad2c5 100644
--- a/chrome/browser/utility_process_host.cc
+++ b/chrome/browser/utility_process_host.cc
@@ -41,9 +41,12 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
if (!CreateChannel())
return false;
- std::wstring exe_path;
- if (!PathService::Get(base::FILE_EXE, &exe_path))
- return false;
+ std::wstring exe_path = CommandLine::ForCurrentProcess()->GetSwitchValue(
+ switches::kBrowserSubprocessPath);
+ if (exe_path.empty()) {
+ if (!PathService::Get(base::FILE_EXE, &exe_path))
+ return false;
+ }
CommandLine cmd_line(exe_path);
cmd_line.AppendSwitchWithValue(switches::kProcessType,