blob: 73d30fd63c05fc42f92a66eb21f59a6772a92491 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module network.mojom;
import "services/network/public/mojom/isolation_info.mojom";
import "url/mojom/origin.mojom";
import "url/mojom/url.mojom";
// Represents the result of retrieving an origin policy.
struct OriginPolicy;
// An interface for handling all origin policy related operations.
interface OriginPolicyManager {
// Attempts to retrieve the origin policy for an origin and `Origin-Policy`
// |header_value| (if one exists). Calls back with the result.
// This will eventually correspond to
// although the implementation is currently being updated (
// so it doesn't match yet.
// |isolation_info| is the IsolationInfo used to control caching and fetching
// of the origin policy, and must not be empty. OriginPolicy fetches are
// uncredentialed and don't follow redirects, so it should have a RedirectMode
// of kUpdateNothing and null SiteForCookies to be consistent with that
// behavior.
RetrieveOriginPolicy(url.mojom.Origin origin,
IsolationInfo isolation_info,
string? header_value) => (OriginPolicy origin_policy);
// Adds an exception for the specified origin. This means that no policy will
// apply for the specified origin from this point forward. This is used to
// allow the user pressing "Continue" on the interstitial to override the
// header's demands for an origin policy.
AddExceptionFor(url.mojom.Origin origin);