chromium/components/subresource_filter/core/common/first_party_origin.h

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

#ifndef COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_FIRST_PARTY_ORIGIN_H_
#define COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_FIRST_PARTY_ORIGIN_H_

#include <string>

#include "url/gurl.h"
#include "url/origin.h"

namespace subresource_filter {

// Encapsulates the first-party origin of a document, and provides fast (cached)
// third-partiness checks against that origin, i.e. whether a given URL is
// third-party in relation to the document's origin.
//
// It uses a simple one-entry cache to optimize for the case when a significant
// number of consecutive URLs have the same domain.
class FirstPartyOrigin {};

}  // namespace subresource_filter

#endif  // COMPONENTS_SUBRESOURCE_FILTER_CORE_COMMON_FIRST_PARTY_ORIGIN_H_