mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
7498491: update process_id to use OriginatingProcess type
The upstream Chromium API changed - URLLoaderFactoryParams::process_id was changed from an integer to a union type network::OriginatingProcess that distinguishes between browser and renderer processes. - For browser process requests, use OriginatingProcess::browser() - For renderer process lookups, check !is_browser() and use renderer_process().value() to get the child_id Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7498491
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include "gin/arguments.h"
|
||||
#include "media/audio/audio_device_description.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/network/public/cpp/originating_process.h"
|
||||
#include "services/network/public/cpp/url_loader_factory_builder.h"
|
||||
#include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
|
||||
#include "services/network/public/mojom/network_context.mojom.h"
|
||||
@@ -588,7 +589,7 @@ ElectronBrowserContext::GetURLLoaderFactory() {
|
||||
network::mojom::URLLoaderFactoryParamsPtr params =
|
||||
network::mojom::URLLoaderFactoryParams::New();
|
||||
params->header_client = std::move(header_client);
|
||||
params->process_id = network::mojom::kBrowserProcessId;
|
||||
params->process_id = network::OriginatingProcess::browser();
|
||||
params->is_trusted = true;
|
||||
params->is_orb_enabled = false;
|
||||
// The tests of net module would fail if this setting is true, it seems that
|
||||
|
||||
Reference in New Issue
Block a user