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

Unified Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 6930059: Make Pepper work out-of-process in the windows sandbox (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_plugin_main.cc
===================================================================
--- content/ppapi_plugin/ppapi_plugin_main.cc (revision 84503)
+++ content/ppapi_plugin/ppapi_plugin_main.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/debug/debugger.h"
#include "base/message_loop.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
@@ -12,11 +13,32 @@
#include "content/ppapi_plugin/ppapi_thread.h"
#include "ppapi/proxy/proxy_module.h"
+#if defined(OS_WIN)
+#include "sandbox/src/sandbox.h"
+#endif
+
+#if defined(OS_WIN)
+sandbox::TargetServices* g_target_services = NULL;
+#else
+void* g_target_services = 0;
+#endif
+
// Main function for starting the PPAPI plugin process.
int PpapiPluginMain(const MainFunctionParams& parameters) {
const CommandLine& command_line = parameters.command_line_;
+
+#if defined(OS_WIN)
+ g_target_services = parameters.sandbox_info_.TargetServices();
+#endif
+
+ // If |g_target_services| is not null this process is sandboxed. One side
+ // effect is that we can't pop dialogs like ChildProcess::WaitForDebugger()
+ // does.
if (command_line.HasSwitch(switches::kPpapiStartupDialog)) {
- ChildProcess::WaitForDebugger("Ppapi");
+ if (g_target_services)
+ base::debug::WaitForDebugger(2*60, false);
+ else
+ ChildProcess::WaitForDebugger("Ppapi");
}
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
« no previous file with comments | « content/browser/ppapi_plugin_process_host.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698