chromium/third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom

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

module blink.mojom;

import "services/network/public/mojom/url_loader_factory.mojom";
import "url/mojom/origin.mojom";

// A collection of URLLoaderFactory interfaces.
//
// This supports a scenario where URLLoaderFactoryBundle contains only
// the factories that need to be updated (and allows leaving out factories
// that should not be updated/cloberred).
// See also blink::URLLoaderFactoryBundle::Update.
struct URLLoaderFactoryBundle {
  // The default factory to be used when no others apply.
  // This must be non-null for a navigation commit when NetworkService is
  // enabled. (In other cases all factories including this are optional)
  //
  // TODO(jam): https://crbug.com/887109: Remove |default_factory| and put it
  // inside |scheme_specific_factories| instead.
  pending_remote<network.mojom.URLLoaderFactory>? default_factory;

  // A mapping from URL scheme to factory interface.
  map<string, pending_remote<network.mojom.URLLoaderFactory>>
      scheme_specific_factories;

  // A mapping from isolated world's origin to factory interface.
  map<url.mojom.Origin, pending_remote<network.mojom.URLLoaderFactory>>
      isolated_world_factories;

  // Whether redirect checks should be bypassed, since they are happening in the
  // browser.
  bool bypass_redirect_checks = false;
};