#include "content/browser/url_loader_factory_params_helper.h"
#include <optional>
#include <string_view>
#include "base/command_line.h"
#include "content/browser/devtools/network_service_devtools_observer.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/navigation_request.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/runtime_feature_state/runtime_feature_state_document_data.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "ipc/ipc_message.h"
#include "net/base/isolation_info.h"
#include "net/cookies/cookie_setting_override.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
#include "services/network/public/mojom/early_hints.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/shared_dictionary_access_observer.mojom.h"
#include "services/network/public/mojom/url_loader.mojom-shared.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/common/web_preferences/web_preferences.h"
namespace content {
namespace {
BASE_FEATURE(…);
network::mojom::URLLoaderFactoryParamsPtr CreateParams(
RenderProcessHost* process,
const url::Origin& origin,
const url::Origin& request_initiator_origin_lock,
bool is_trusted,
const std::optional<blink::LocalFrameToken>& top_frame_token,
const net::IsolationInfo& isolation_info,
network::mojom::ClientSecurityStatePtr client_security_state,
mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
coep_reporter,
bool allow_universal_access_from_file_urls,
bool is_for_isolated_world,
mojo::PendingRemote<network::mojom::CookieAccessObserver> cookie_observer,
mojo::PendingRemote<network::mojom::TrustTokenAccessObserver>
trust_token_observer,
mojo::PendingRemote<network::mojom::SharedDictionaryAccessObserver>
shared_dictionary_observer,
mojo::PendingRemote<network::mojom::URLLoaderNetworkServiceObserver>
url_loader_network_observer,
mojo::PendingRemote<network::mojom::DevToolsObserver> devtools_observer,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_issuance_policy,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_redemption_policy,
net::CookieSettingOverrides cookie_setting_overrides,
std::string_view debug_tag,
bool require_cross_site_request_for_cookies) { … }
}
network::mojom::URLLoaderFactoryParamsPtr
URLLoaderFactoryParamsHelper::CreateForFrame(
RenderFrameHostImpl* frame,
const url::Origin& frame_origin,
const net::IsolationInfo& isolation_info,
network::mojom::ClientSecurityStatePtr client_security_state,
mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
coep_reporter,
RenderProcessHost* process,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_issuance_policy,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_redemption_policy,
net::CookieSettingOverrides cookie_setting_overrides,
std::string_view debug_tag) { … }
network::mojom::URLLoaderFactoryParamsPtr
URLLoaderFactoryParamsHelper::CreateForIsolatedWorld(
RenderFrameHostImpl* frame,
const url::Origin& isolated_world_origin,
const url::Origin& main_world_origin,
const net::IsolationInfo& isolation_info,
network::mojom::ClientSecurityStatePtr client_security_state,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_issuance_policy,
network::mojom::TrustTokenOperationPolicyVerdict
trust_token_redemption_policy,
net::CookieSettingOverrides cookie_setting_overrides) { … }
network::mojom::URLLoaderFactoryParamsPtr
URLLoaderFactoryParamsHelper::CreateForPrefetch(
RenderFrameHostImpl* frame,
network::mojom::ClientSecurityStatePtr client_security_state,
net::CookieSettingOverrides cookie_setting_overrides) { … }
network::mojom::URLLoaderFactoryParamsPtr
URLLoaderFactoryParamsHelper::CreateForWorker(
RenderProcessHost* process,
const url::Origin& request_initiator,
const net::IsolationInfo& isolation_info,
mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
coep_reporter,
mojo::PendingRemote<network::mojom::URLLoaderNetworkServiceObserver>
url_loader_network_observer,
mojo::PendingRemote<network::mojom::DevToolsObserver> devtools_observer,
network::mojom::ClientSecurityStatePtr client_security_state,
std::string_view debug_tag,
bool require_cross_site_request_for_cookies) { … }
network::mojom::URLLoaderFactoryParamsPtr
URLLoaderFactoryParamsHelper::CreateForEarlyHintsPreload(
RenderProcessHost* process,
const url::Origin& tentative_origin,
NavigationRequest& navigation_request,
const network::mojom::EarlyHints& early_hints,
mojo::PendingRemote<network::mojom::CookieAccessObserver> cookie_observer,
mojo::PendingRemote<network::mojom::TrustTokenAccessObserver>
trust_token_observer,
mojo::PendingRemote<network::mojom::SharedDictionaryAccessObserver>
shared_dictionary_observer) { … }
}