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

Unified Diff: headless/app/headless_shell.cc

Issue 2626823003: [headless] Add default browser context to HeadlessBrowser. (Closed)
Patch Set: More explicit error message. Created 3 years, 11 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 | « no previous file | headless/lib/browser/headless_browser_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/app/headless_shell.cc
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc
index 42a331fb9fbe326ce760a71229ee363ad895ebde..fbd0feac31617819a933f68cffd3ffbedb31e3c8 100644
--- a/headless/app/headless_shell.cc
+++ b/headless/app/headless_shell.cc
@@ -75,6 +75,8 @@ class HeadlessShell : public HeadlessWebContents::Observer,
HeadlessBrowserContext::Builder context_builder =
browser_->CreateBrowserContextBuilder();
+ // TODO(eseckler): These switches should also affect BrowserContexts that
+ // are created via DevTools later.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDeterministicFetch)) {
deterministic_dispatcher_.reset(
@@ -98,6 +100,7 @@ class HeadlessShell : public HeadlessWebContents::Observer,
}));
}
browser_context_ = context_builder.Build();
+ browser_->SetDefaultBrowserContext(browser_context_);
HeadlessWebContents::Builder builder(
browser_context_->CreateWebContentsBuilder());
« no previous file with comments | « no previous file | headless/lib/browser/headless_browser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698