fix: append network switches to network service process (#20546)

This commit is contained in:
Robo 2019-10-13 18:21:41 -07:00 committed by GitHub
parent 5bd7b6ad50
commit 5c2c30142c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -580,6 +580,16 @@ void AtomBrowserClient::AdjustUtilityServiceProcessCommandLine(
if (identity.name() == audio::mojom::kServiceName)
command_line->AppendSwitch(::switches::kMessageLoopTypeUi);
#endif
if (identity.name() == content::mojom::kNetworkServiceName) {
// Copy following switches to network service process.
static const char* const kCommonSwitchNames[] = {
switches::kStandardSchemes, switches::kSecureSchemes,
switches::kBypassCSPSchemes, switches::kCORSSchemes,
switches::kFetchSchemes, switches::kServiceWorkerSchemes};
command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(),
kCommonSwitchNames,
base::size(kCommonSwitchNames));
}
}
void AtomBrowserClient::DidCreatePpapiPlugin(content::BrowserPpapiHost* host) {