chromium/third_party/blink/renderer/platform/network/blink_schemeful_site.h

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

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_NETWORK_BLINK_SCHEMEFUL_SITE_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_NETWORK_BLINK_SCHEMEFUL_SITE_H_

#include "base/check.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace network {
namespace mojom {
class SchemefulSiteDataView;
}  // namespace mojom
}  // namespace network

namespace url {
class Origin;
}  // namespace url

namespace blink {

// This class is the blink version of net::SchemefulSite and only implements a
// subset of its features. Its data members should be kept in sync.
//
// It represents a scheme and eTLD+1 for an origin, as specified by
// https://html.spec.whatwg.org/multipage/origin.html#obtain-a-site.
//
// See schemeful_site.h for more information.
class PLATFORM_EXPORT BlinkSchemefulSite {};

}  // namespace blink

namespace WTF {

template <>
struct HashTraits<blink::BlinkSchemefulSite>
    : OneFieldHashTraits<blink::BlinkSchemefulSite,
                         &blink::BlinkSchemefulSite::site_as_origin_> {};

}  // namespace WTF

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_NETWORK_BLINK_SCHEMEFUL_SITE_H_