summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_process.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 19:35:21 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 19:35:21 +0000
commit8ee8189e6ae18d1d9ada90601b0c4e1b08c865d8 (patch)
tree7bd18aae0fb746fe0ab54593cb7ef0d98610000b /chrome/renderer/render_process.cc
parentcf13cfb4b44dc30a8d3dde60e6d900a7cacb29d2 (diff)
downloadchromium_src-8ee8189e6ae18d1d9ada90601b0c4e1b08c865d8.zip
chromium_src-8ee8189e6ae18d1d9ada90601b0c4e1b08c865d8.tar.gz
chromium_src-8ee8189e6ae18d1d9ada90601b0c4e1b08c865d8.tar.bz2
Hackish changes to make gears work in the renderer with the sandbox.
Review URL: http://codereview.chromium.org/6434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_process.cc')
-rw-r--r--chrome/renderer/render_process.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/renderer/render_process.cc b/chrome/renderer/render_process.cc
index 55e1e5a..f1885b9 100644
--- a/chrome/renderer/render_process.cc
+++ b/chrome/renderer/render_process.cc
@@ -12,8 +12,10 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/histogram.h"
+#include "base/path_service.h"
#include "chrome/browser/net/dns_global.h" // TODO(jar): DNS calls should be renderer specific, not including browser.
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/chrome_paths.h"
#include "chrome/common/ipc_channel.h"
#include "chrome/common/ipc_message_utils.h"
#include "chrome/common/render_messages.h"
@@ -86,6 +88,14 @@ bool RenderProcess::GlobalInit(const std::wstring &channel_name) {
StatisticsRecorder::set_dump_on_exit(true);
}
+ if (command_line.HasSwitch(switches::kGearsInRenderer)) {
+ // Load gears.dll on startup so we can access it before the sandbox
+ // blocks us.
+ std::wstring path;
+ if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &path))
+ LoadLibrary(path.c_str());
+ }
+
ChildProcessFactory<RenderProcess> factory;
return ChildProcess::GlobalInit(channel_name, &factory);
}