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

Unified Diff: headless/lib/browser/headless_browser_impl.cc

Issue 2835603002: Revert of Add --headless flag to Windows (Closed)
Patch Set: Created 3 years, 8 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 | « headless/lib/browser/DEPS ('k') | headless/lib/headless_browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_browser_impl.cc
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
index c45408f9e38013ca3c1602cb97439a2633178ea7..747639ca3f68c116562f531cef63a57c8e19a0b6 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -27,6 +27,11 @@
#include "ui/events/devices/device_data_manager.h"
#include "ui/gfx/geometry/size.h"
+#if defined(OS_WIN)
+#include "content/public/app/sandbox_helper_win.h"
+#include "sandbox/win/src/sandbox_types.h"
+#endif
+
namespace headless {
namespace {
@@ -35,10 +40,9 @@
const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback) {
content::ContentMainParams params(nullptr);
#if defined(OS_WIN)
- // Sandbox info has to be set and initialized.
- CHECK(options.sandbox_info);
- params.instance = options.instance;
- params.sandbox_info = std::move(options.sandbox_info);
+ sandbox::SandboxInterfaceInfo sandbox_info = {0};
+ content::InitializeSandboxInfo(&sandbox_info);
+ params.sandbox_info = &sandbox_info;
#elif !defined(OS_ANDROID)
params.argc = options.argc;
params.argv = options.argv;
@@ -196,7 +200,6 @@
return find_it->second.get();
}
-#if !defined(OS_WIN)
void RunChildProcessIfNeeded(int argc, const char** argv) {
base::CommandLine::Init(argc, argv);
const base::CommandLine& command_line(
@@ -215,7 +218,6 @@
exit(RunContentMain(builder.Build(),
base::Callback<void(HeadlessBrowser*)>()));
}
-#endif // !defined(OS_WIN)
int HeadlessBrowserMain(
HeadlessBrowser::Options options,
« no previous file with comments | « headless/lib/browser/DEPS ('k') | headless/lib/headless_browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698