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

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

Issue 2873283002: [Reland] Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)
Patch Set: Try and fix build with a dep Created 3 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
Index: headless/lib/browser/headless_browser_context_impl.cc
diff --git a/headless/lib/browser/headless_browser_context_impl.cc b/headless/lib/browser/headless_browser_context_impl.cc
index 09ee140058bc3bfa5ab621260dc2977541aad901..d680daa5a66f40cd94005e357c1d84a3825690a6 100644
--- a/headless/lib/browser/headless_browser_context_impl.cc
+++ b/headless/lib/browser/headless_browser_context_impl.cc
@@ -29,10 +29,6 @@
namespace headless {
-namespace {
-const char kHeadlessMojomProtocol[] = "headless-mojom";
-}
-
// Contains net::URLRequestContextGetter required for resource loading.
// Must be destructed on the IO thread as per content::ResourceContext
// requirements.
@@ -414,19 +410,6 @@ HeadlessBrowserContext::Builder::SetOverrideWebPreferencesCallback(
HeadlessBrowserContext* HeadlessBrowserContext::Builder::Build() {
if (!mojo_bindings_.empty()) {
- std::unique_ptr<InMemoryProtocolHandler> headless_mojom_protocol_handler(
- new InMemoryProtocolHandler());
- for (const MojoBindings& binding : mojo_bindings_) {
- headless_mojom_protocol_handler->InsertResponse(
- binding.mojom_name,
- InMemoryProtocolHandler::Response(binding.js_bindings,
- "application/javascript"));
- }
- DCHECK(options_->protocol_handlers_.find(kHeadlessMojomProtocol) ==
- options_->protocol_handlers_.end());
- options_->protocol_handlers_[kHeadlessMojomProtocol] =
- std::move(headless_mojom_protocol_handler);
-
// Unless you know what you're doing it's unsafe to allow http/https for a
// context with mojo bindings.
if (!enable_http_and_https_if_mojo_used_) {

Powered by Google App Engine
This is Rietveld 408576698