| 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <objbase.h> | 8 #include <objbase.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 DLOG(INFO) << "Started plugin with " << | 87 DLOG(INFO) << "Started plugin with " << |
| 88 parsed_command_line.command_line_string(); | 88 parsed_command_line.command_line_string(); |
| 89 | 89 |
| 90 HMODULE sandbox_test_module = NULL; | 90 HMODULE sandbox_test_module = NULL; |
| 91 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || | 91 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox) || |
| 92 !parsed_command_line.HasSwitch(switches::kSafePlugins); | 92 !parsed_command_line.HasSwitch(switches::kSafePlugins); |
| 93 if (target_services && !no_sandbox) { | 93 if (target_services && !no_sandbox) { |
| 94 // The command line might specify a test plugin to load. | 94 // The command line might specify a test plugin to load. |
| 95 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) { | 95 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) { |
| 96 std::wstring test_plugin_name = | 96 std::wstring test_plugin_name = |
| 97 parsed_command_line.GetSwitchValue(switches::kTestSandbox); | 97 parsed_command_line.GetSwitchValueNative(switches::kTestSandbox); |
| 98 sandbox_test_module = LoadLibrary(test_plugin_name.c_str()); | 98 sandbox_test_module = LoadLibrary(test_plugin_name.c_str()); |
| 99 DCHECK(sandbox_test_module); | 99 DCHECK(sandbox_test_module); |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 #endif | 102 #endif |
| 103 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { | 103 if (parsed_command_line.HasSwitch(switches::kPluginStartupDialog)) { |
| 104 ChildProcess::WaitForDebugger(L"Plugin"); | 104 ChildProcess::WaitForDebugger(L"Plugin"); |
| 105 } | 105 } |
| 106 | 106 |
| 107 { | 107 { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 135 | 135 |
| 136 MessageLoop::current()->Run(); | 136 MessageLoop::current()->Run(); |
| 137 } | 137 } |
| 138 | 138 |
| 139 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
| 140 CoUninitialize(); | 140 CoUninitialize(); |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 return 0; | 143 return 0; |
| 144 } | 144 } |
| OLD | NEW |