void ElectronBrowserClient::RenderProcessWillLaunch(
    content::RenderProcessHost* host) {
  // When a render process is crashed, it might be reused.
  int process_id = host->GetID();

  auto* browser_context = host->GetBrowserContext();
  ALLOW_UNUSED_LOCAL(browser_context);

#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
  host->AddFilter(
      new extensions::ExtensionMessageFilter(process_id, browser_context));
  host->AddFilter(new extensions::ExtensionsGuestViewMessageFilter(
      process_id, browser_context));
  host->AddFilter(
      new ElectronExtensionMessageFilter(process_id, browser_context));
#endif

  // ensure the ProcessPreferences is removed later
  host->AddObserver(this);
}
void ElectronBrowserClient::RenderProcessWillLaunch(
    content::RenderProcessHost* host) {
   
  int process_id = host->GetID();

  auto* browser_context = host->GetBrowserContext();
  ALLOW_UNUSED_LOCAL(browser_context);

#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
  host->AddFilter(
      new extensions::ExtensionMessageFilter(process_id, browser_context));
  host->AddFilter(new extensions::ExtensionsGuestViewMessageFilter(
      process_id, browser_context));
  host->AddFilter(
      new ElectronExtensionMessageFilter(process_id, browser_context));
#endif

   
  host->AddObserver(this);
}