OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 #if defined(ARCH_CPU_64_BITS) | 96 #if defined(ARCH_CPU_64_BITS) |
97 WorkaroundFlashLAHF(); | 97 WorkaroundFlashLAHF(); |
98 #endif | 98 #endif |
99 | 99 |
100 #elif defined(OS_WIN) | 100 #elif defined(OS_WIN) |
101 sandbox::TargetServices* target_services = | 101 sandbox::TargetServices* target_services = |
102 parameters.sandbox_info_.TargetServices(); | 102 parameters.sandbox_info_.TargetServices(); |
103 | 103 |
104 CoInitialize(NULL); | 104 CoInitialize(NULL); |
105 DVLOG(1) << "Started plugin with " | 105 DVLOG(1) << "Started plugin with " |
106 << parsed_command_line.command_line_string(); | 106 << parsed_command_line.GetCommandLineString(); |
107 | 107 |
108 HMODULE sandbox_test_module = NULL; | 108 HMODULE sandbox_test_module = NULL; |
109 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); | 109 bool no_sandbox = parsed_command_line.HasSwitch(switches::kNoSandbox); |
110 | 110 |
111 if (target_services && !no_sandbox) { | 111 if (target_services && !no_sandbox) { |
112 // The command line might specify a test plugin to load. | 112 // The command line might specify a test plugin to load. |
113 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) { | 113 if (parsed_command_line.HasSwitch(switches::kTestSandbox)) { |
114 std::wstring test_plugin_name = | 114 std::wstring test_plugin_name = |
115 parsed_command_line.GetSwitchValueNative(switches::kTestSandbox); | 115 parsed_command_line.GetSwitchValueNative(switches::kTestSandbox); |
116 sandbox_test_module = LoadLibrary(test_plugin_name.c_str()); | 116 sandbox_test_module = LoadLibrary(test_plugin_name.c_str()); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 MessageLoop::current()->Run(); | 163 MessageLoop::current()->Run(); |
164 } | 164 } |
165 | 165 |
166 #if defined(OS_WIN) | 166 #if defined(OS_WIN) |
167 CoUninitialize(); | 167 CoUninitialize(); |
168 #endif | 168 #endif |
169 | 169 |
170 return 0; | 170 return 0; |
171 } | 171 } |
OLD | NEW |