#include "content/browser/renderer_host/ipc_utils.h"
#include <optional>
#include <utility>
#include "content/browser/bad_message.h"
#include "content/browser/blob_storage/chrome_blob_storage_context.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/common/features.h"
#include "content/common/frame.mojom.h"
#include "content/common/navigation_params_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/url_constants.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom.h"
namespace content {
namespace {
bool VerifyBlobToken(
int process_id,
const mojo::PendingRemote<blink::mojom::BlobURLToken>& received_token,
const GURL& received_url) { … }
bool VerifyInitiatorOrigin(
int process_id,
const url::Origin& initiator_origin,
const RenderFrameHostImpl* current_rfh = nullptr,
GURL* navigation_url = nullptr,
std::optional<blink::LocalFrameToken>* initiator_frame_token = nullptr) { … }
}
bool VerifyDownloadUrlParams(RenderProcessHost* process,
const blink::mojom::DownloadURLParams& params) { … }
bool VerifyOpenURLParams(RenderFrameHostImpl* current_rfh,
RenderProcessHost* process,
const blink::mojom::OpenURLParamsPtr& params,
GURL* out_validated_url,
scoped_refptr<network::SharedURLLoaderFactory>*
out_blob_url_loader_factory) { … }
bool VerifyBeginNavigationCommonParams(
const RenderFrameHostImpl& current_rfh,
blink::mojom::CommonNavigationParams* common_params,
std::optional<blink::LocalFrameToken>& initiator_frame_token) { … }
bool VerifyNavigationInitiator(
RenderFrameHostImpl* current_rfh,
const std::optional<blink::LocalFrameToken>& initiator_frame_token,
int initiator_process_id) { … }
}