| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "app/hi_res_timer_manager.h" | 7 #include "app/hi_res_timer_manager.h" |
| 8 #include "app/system_monitor.h" | 8 #include "app/system_monitor.h" |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include "app/win_util.h" | 10 #include "app/win_util.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #endif | 55 #endif |
| 56 MessageLoop main_message_loop(MessageLoop::TYPE_UI); | 56 MessageLoop main_message_loop(MessageLoop::TYPE_UI); |
| 57 std::wstring app_name = chrome::kBrowserAppName; | 57 std::wstring app_name = chrome::kBrowserAppName; |
| 58 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); | 58 PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str()); |
| 59 | 59 |
| 60 SystemMonitor system_monitor; | 60 SystemMonitor system_monitor; |
| 61 HighResolutionTimerManager high_resolution_timer_manager; | 61 HighResolutionTimerManager high_resolution_timer_manager; |
| 62 | 62 |
| 63 const CommandLine& parsed_command_line = parameters.command_line_; | 63 const CommandLine& parsed_command_line = parameters.command_line_; |
| 64 | 64 |
| 65 #if defined(OS_WIN) | 65 #if defined(OS_LINUX) |
| 66 // On Linux we exec ourselves from /proc/self/exe, but that makes the |
| 67 // process name that shows up in "ps" etc. for plugins show as "exe" |
| 68 // instead of "chrome" or something reasonable. Try to fix it. |
| 69 CommandLine::SetProcTitle(); |
| 70 #elif defined(OS_WIN) |
| 66 sandbox::TargetServices* target_services = | 71 sandbox::TargetServices* target_services = |
| 67 parameters.sandbox_info_.TargetServices(); | 72 parameters.sandbox_info_.TargetServices(); |
| 68 | 73 |
| 69 CoInitialize(NULL); | 74 CoInitialize(NULL); |
| 70 DLOG(INFO) << "Started plugin with " << | 75 DLOG(INFO) << "Started plugin with " << |
| 71 parsed_command_line.command_line_string(); | 76 parsed_command_line.command_line_string(); |
| 72 | 77 |
| 73 HMODULE sandbox_test_module = NULL; | 78 HMODULE sandbox_test_module = NULL; |
| 74 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || | 79 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || |
| 75 !parsed_command_line.HasSwitch(switches::kSafePlugins); | 80 !parsed_command_line.HasSwitch(switches::kSafePlugins); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 122 |
| 118 MessageLoop::current()->Run(); | 123 MessageLoop::current()->Run(); |
| 119 } | 124 } |
| 120 | 125 |
| 121 #if defined(OS_WIN) | 126 #if defined(OS_WIN) |
| 122 CoUninitialize(); | 127 CoUninitialize(); |
| 123 #endif | 128 #endif |
| 124 | 129 |
| 125 return 0; | 130 return 0; |
| 126 } | 131 } |
| OLD | NEW |