chromium/components/client_hints/browser/in_memory_client_hints_controller_delegate.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/client_hints/browser/in_memory_client_hints_controller_delegate.h"

#include <vector>

#include "base/functional/bind.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "third_party/blink/public/common/client_hints/enabled_client_hints.h"
#include "url/origin.h"

namespace client_hints {

InMemoryClientHintsControllerDelegate::InMemoryClientHintsControllerDelegate(
    network::NetworkQualityTracker* network_quality_tracker,
    base::RepeatingCallback<bool(const GURL&)> is_javascript_allowed_callback,
    base::RepeatingCallback<bool(const GURL&)>
        are_third_party_cookies_blocked_callback,
    blink::UserAgentMetadata user_agent_metadata)
    :{}

InMemoryClientHintsControllerDelegate::
    ~InMemoryClientHintsControllerDelegate() = default;

// Enabled Client Hints are only cached and not persisted in this
// implementation.
void InMemoryClientHintsControllerDelegate::PersistClientHints(
    const url::Origin& primary_origin,
    content::RenderFrameHost* parent_rfh,
    const std::vector<network::mojom::WebClientHintsType>& client_hints) {}

// Looks up enabled Client Hints for the URL origin, and adds additional Client
// Hints if set.
void InMemoryClientHintsControllerDelegate::GetAllowedClientHintsFromSource(
    const url::Origin& origin,
    blink::EnabledClientHints* client_hints) {}

void InMemoryClientHintsControllerDelegate::SetAdditionalClientHints(
    const std::vector<network::mojom::WebClientHintsType>& hints) {}

void InMemoryClientHintsControllerDelegate::ClearAdditionalClientHints() {}

network::NetworkQualityTracker*
InMemoryClientHintsControllerDelegate::GetNetworkQualityTracker() {}

bool InMemoryClientHintsControllerDelegate::IsJavaScriptAllowed(
    const GURL& url,
    content::RenderFrameHost* parent_rfh) {}

bool InMemoryClientHintsControllerDelegate::AreThirdPartyCookiesBlocked(
    const GURL& url,
    content::RenderFrameHost* rfh) {}

blink::UserAgentMetadata
InMemoryClientHintsControllerDelegate::GetUserAgentMetadata() {}

void InMemoryClientHintsControllerDelegate::SetMostRecentMainFrameViewportSize(
    const gfx::Size& viewport_size) {}

gfx::Size
InMemoryClientHintsControllerDelegate::GetMostRecentMainFrameViewportSize() {}

}  // namespace client_hints