Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: content/plugin/plugin_main.cc

Issue 8414020: Expose the sandbox related code through the content API. I did a bit of cleanup while I was doing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 TrimInterposeEnvironment(); 82 TrimInterposeEnvironment();
83 #endif 83 #endif
84 InitializeChromeApplication(); 84 InitializeChromeApplication();
85 #endif 85 #endif
86 MessageLoop main_message_loop(MessageLoop::TYPE_UI); 86 MessageLoop main_message_loop(MessageLoop::TYPE_UI);
87 base::PlatformThread::SetName("CrPluginMain"); 87 base::PlatformThread::SetName("CrPluginMain");
88 88
89 base::SystemMonitor system_monitor; 89 base::SystemMonitor system_monitor;
90 HighResolutionTimerManager high_resolution_timer_manager; 90 HighResolutionTimerManager high_resolution_timer_manager;
91 91
92 const CommandLine& parsed_command_line = parameters.command_line_; 92 const CommandLine& parsed_command_line = parameters.command_line;
93 93
94 #if defined(OS_LINUX) 94 #if defined(OS_LINUX)
95 95
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->target_services;
103 103
104 CoInitialize(NULL); 104 CoInitialize(NULL);
105 DVLOG(1) << "Started plugin with " 105 DVLOG(1) << "Started plugin with "
106 << parsed_command_line.GetCommandLineString(); 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.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698