From 8a6fccf3d13f1dbf0119f0b67236db192993c89e Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sun, 22 Jul 2018 01:40:06 +1000 Subject: [PATCH] [GURL] (1 of 2) Prep for stripping "username:password" from internal schemes https://chromium-review.googlesource.com/c/chromium/src/+/978450 --- atom/browser/api/atom_api_protocol.cc | 2 +- atom/renderer/renderer_client_base.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 5e1f991ad..9c171abd5 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -50,7 +50,7 @@ void RegisterStandardSchemes(const std::vector& schemes, // Dynamically register the schemes. auto* policy = content::ChildProcessSecurityPolicy::GetInstance(); for (const std::string& scheme : schemes) { - url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT); + url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST); if (secure) { url::AddSecureScheme(scheme.c_str()); } diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index 07e52f5a7..ae455f04b 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -78,7 +78,7 @@ RendererClientBase::RendererClientBase() { std::vector standard_schemes_list = ParseSchemesCLISwitch(command_line, switches::kStandardSchemes); for (const std::string& scheme : standard_schemes_list) - url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT); + url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST); isolated_world_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kContextIsolation); // We rely on the unique process host id which is notified to the