// 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.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package net.proto;

// This enum must be kept in sync with net::IsolationInfo::FrameAncestorRelation
enum FrameAncestorRelation {
  SAME_ORIGIN = 1;
  SAME_SITE = 2;
  CROSS_SITE = 3;
}

message IsolationInfo {
  optional int32 request_type = 1;  // net::IsolationInfo::RequestType
  optional string top_frame_origin = 2;
  optional string frame_origin = 3;
  optional string site_for_cookies = 4;
  optional int32 network_isolation_partition =
      6;  // net::NetworkIsolationPartition. Defaults to kGeneral.
  optional FrameAncestorRelation frame_ancestor_relation = 7;

  reserved 5;
  reserved "party_context";
}
