diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 01:06:26 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 01:06:26 +0000 |
commit | 0923559a1a020690c1d199fda3c55f67d2d54335 (patch) | |
tree | bda5097d2081d42aed964dd675e86f906c8eac50 /chrome | |
parent | 1fa8dd983ae9e3f808aa804596d965f02f031aa6 (diff) | |
download | chromium_src-0923559a1a020690c1d199fda3c55f67d2d54335.zip chromium_src-0923559a1a020690c1d199fda3c55f67d2d54335.tar.gz chromium_src-0923559a1a020690c1d199fda3c55f67d2d54335.tar.bz2 |
Have the utility process run out of process on Linux again by
using the /proc/self/exe trick we use for plugins. Since we don't
need any resources from .pak files, this should be safe.
BUG=22703
TEST=Install a theme, verify that it worked properly.
Review URL: http://codereview.chromium.org/464073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34117 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/extensions/extension_updater.cc | 6 | ||||
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker.cc | 6 | ||||
-rw-r--r-- | chrome/browser/utility_process_host.cc | 13 | ||||
-rw-r--r-- | chrome/browser/web_resource/web_resource_service.cc | 6 |
4 files changed, 4 insertions, 27 deletions
diff --git a/chrome/browser/extensions/extension_updater.cc b/chrome/browser/extensions/extension_updater.cc index 6267e5ee..9228905 100644 --- a/chrome/browser/extensions/extension_updater.cc +++ b/chrome/browser/extensions/extension_updater.cc @@ -284,12 +284,6 @@ class SafeManifestParser : public UtilityProcessHost::Client { // UtilityProcessHost should handle it for us. (http://crbug.com/19192) bool use_utility_process = rdh && !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); - -#if defined(OS_LINUX) - // TODO(port): Don't use a utility process on linux (crbug.com/22703). - use_utility_process = false; -#endif - if (use_utility_process) { UtilityProcessHost* host = new UtilityProcessHost( rdh, this, ChromeThread::UI); diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index a3ece10..5203e69 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -64,12 +64,6 @@ void SandboxedExtensionUnpacker::Start() { // UtilityProcessHost should handle it for us. (http://crbug.com/19192) bool use_utility_process = rdh_ && !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); - -#if defined(OS_LINUX) - // TODO(port): Don't use a utility process on linux (crbug.com/22703). - use_utility_process = false; -#endif - if (use_utility_process) { ChromeThread::PostTask( ChromeThread::IO, FROM_HERE, diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc index 352425a..9b03634 100644 --- a/chrome/browser/utility_process_host.cc +++ b/chrome/browser/utility_process_host.cc @@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/message_loop.h" +#include "chrome/browser/browser_process.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/render_messages.h" #include "ipc/ipc_switches.h" @@ -55,13 +56,6 @@ FilePath UtilityProcessHost::GetUtilityProcessCmd() { } bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) { -#if defined(OS_LINUX) - // TODO(port): We should not reach here on Linux (crbug.com/22703). - // (crbug.com/23837) covers enabling this on Linux. - NOTREACHED(); - return false; -#endif - // Name must be set or metrics_service will crash in any test which // launches a UtilityProcessHost. set_name(L"utility process"); @@ -80,9 +74,10 @@ bool UtilityProcessHost::StartProcess(const FilePath& exposed_dir) { switches::kUtilityProcess); cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, ASCIIToWide(channel_id())); - // Pass on the browser locale. + // Pass on the browser locale. TODO(tony): This touches the disk and + // checks for locale dlls/pak files. It shouldn't need to. std::string locale = l10n_util::GetApplicationLocale(L""); - cmd_line->AppendSwitchWithValue(switches::kLang, ASCIIToWide(locale)); + cmd_line->AppendSwitchWithValue(switches::kLang, locale); SetCrashReporterCommandLine(cmd_line); diff --git a/chrome/browser/web_resource/web_resource_service.cc b/chrome/browser/web_resource/web_resource_service.cc index 3d213f1..31e41ae 100644 --- a/chrome/browser/web_resource/web_resource_service.cc +++ b/chrome/browser/web_resource/web_resource_service.cc @@ -110,12 +110,6 @@ class WebResourceService::UnpackerClient bool use_utility_process = web_resource_service_->resource_dispatcher_host_ != NULL && !CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); - -#if defined(OS_LINUX) - // TODO(port): Don't use a utility process on linux (crbug.com/22703). - use_utility_process = false; -#endif - if (use_utility_process) { ChromeThread::ID thread_id; CHECK(ChromeThread::GetCurrentThreadIdentifier(&thread_id)); |