chromium/content/public/browser/site_isolation_policy.cc

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

#include "content/public/browser/site_isolation_policy.h"

#include <algorithm>
#include <iterator>
#include <string>
#include <utility>
#include <vector>

#include "base/command_line.h"
#include "base/containers/flat_set.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/metrics/field_trial_params.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "build/build_config.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/site_isolation_mode.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/switches.h"
#include "url/origin.h"

namespace content {

namespace {

bool g_disable_flag_caching_for_tests =;

bool IsDisableSiteIsolationFlagPresent() {}

#if BUILDFLAG(IS_ANDROID)
bool IsDisableSiteIsolationForPolicyFlagPresent() {
  static const bool site_isolation_disabled_by_policy =
      base::CommandLine::ForCurrentProcess()->HasSwitch(
          switches::kDisableSiteIsolationForPolicy);
  if (g_disable_flag_caching_for_tests) {
    return base::CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kDisableSiteIsolationForPolicy);
  }
  return site_isolation_disabled_by_policy;
}
#endif

bool IsSiteIsolationDisabled(SiteIsolationMode site_isolation_mode) {}

}  // namespace

// static
bool SiteIsolationPolicy::UseDedicatedProcessesForAllSites() {}

// static
bool SiteIsolationPolicy::AreIsolatedSandboxedIframesEnabled() {}

// static
bool SiteIsolationPolicy::AreIsolatedOriginsEnabled() {}

// static
bool SiteIsolationPolicy::IsStrictOriginIsolationEnabled() {}

// static
bool SiteIsolationPolicy::IsErrorPageIsolationEnabled(bool in_main_frame) {}

// static
bool SiteIsolationPolicy::AreDynamicIsolatedOriginsEnabled() {}

// static
bool SiteIsolationPolicy::ArePreloadedIsolatedOriginsEnabled() {}

// static
bool SiteIsolationPolicy::IsProcessIsolationForOriginAgentClusterEnabled() {}

// static
bool SiteIsolationPolicy::IsOriginAgentClusterEnabled() {}

// static
bool SiteIsolationPolicy::AreOriginKeyedProcessesEnabledByDefault() {}

// static
bool SiteIsolationPolicy::AreOriginAgentClustersEnabledByDefault(
    BrowserContext* browser_context) {}

// static
bool SiteIsolationPolicy::IsSiteIsolationForCOOPEnabled() {}

// static
bool SiteIsolationPolicy::ShouldPersistIsolatedCOOPSites() {}

// static
std::string SiteIsolationPolicy::GetIsolatedOriginsFromCommandLine() {}

std::string SiteIsolationPolicy::GetIsolatedOriginsFromFieldTrial() {}

void SiteIsolationPolicy::ApplyGlobalIsolatedOrigins() {}

// static
bool SiteIsolationPolicy::ShouldUrlUseApplicationIsolationLevel(
    BrowserContext* browser_context,
    const GURL& url) {}

// static
void SiteIsolationPolicy::DisableFlagCachingForTesting() {}

// static
bool SiteIsolationPolicy::IsProcessIsolationForFencedFramesEnabled() {}

}  // namespace content