diff options
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_process.cc | 10 |
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); } |