summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/plugin_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/plugin/plugin_main.cc')
-rw-r--r--chrome/plugin/plugin_main.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/plugin/plugin_main.cc b/chrome/plugin/plugin_main.cc
index bc40fb9..c7bb53d 100644
--- a/chrome/plugin/plugin_main.cc
+++ b/chrome/plugin/plugin_main.cc
@@ -53,8 +53,12 @@ int PluginMain(const MainFunctionParams& parameters) {
MB_OK | MB_SETFOREGROUND);
}
- {
- PluginProcess plugin_process;
+ std::wstring channel_name =
+ parsed_command_line.GetSwitchValue(switches::kProcessChannelID);
+ FilePath plugin_path =
+ FilePath::FromWStringHack(
+ parsed_command_line.GetSwitchValue(switches::kPluginPath));
+ if (PluginProcess::GlobalInit(channel_name, plugin_path)) {
if (!no_sandbox && target_services) {
target_services->LowerToken();
}
@@ -79,6 +83,7 @@ int PluginMain(const MainFunctionParams& parameters) {
// message loop to use it when translating messages.
MessageLoop::current()->Run();
}
+ PluginProcess::GlobalCleanup();
CoUninitialize();
return 0;