Commit b184f4b6 authored by Maks Orlovich's avatar Maks Orlovich Committed by Commit Bot

[client hints] Refactor the "should it be sent" renderer code

This is mostly to get clarity on what this should be doing before
I change how parsing of client hints and communication from browser
works, though it's not really dependent.

Change-Id: I04e8b403a6aeae544d2616688a39c65c0e60b5bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083449
Commit-Queue: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: default avatarYoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751068}
parent 0eb24038
......@@ -35,6 +35,7 @@ n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#include "base/single_thread_task_runner.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/web_client_hints/web_client_hints_types.mojom-blink-forward.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/loader/base_fetch_context.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
......@@ -168,7 +169,14 @@ class CORE_EXPORT FrameFetchContext final : public BaseFetchContext {
UserAgentMetadata GetUserAgentMetadata() const;
const ClientHintsPreferences GetClientHintsPreferences() const;
float GetDevicePixelRatio() const;
bool ShouldSendClientHint(mojom::WebClientHintsType,
enum class ClientHintsMode { kLegacy, kStandard };
bool ShouldSendClientHint(ClientHintsMode mode,
const FeaturePolicy*,
const url::Origin& resource_origin,
bool is_1p_origin,
mojom::blink::WebClientHintsType,
mojom::blink::FeaturePolicyFeature,
const ClientHintsPreferences&,
const WebEnabledClientHints&) const;
void SetFirstPartyCookie(ResourceRequest&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment