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

This commit is contained in:
trop[bot]
2019-10-13 21:09:14 -07:00
committed by Robo
parent ee53f8cef6
commit 19162f4bac

View File

@@ -581,6 +581,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) {