chromium/content/browser/renderer_host/recently_destroyed_hosts.h

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

#ifndef CONTENT_BROWSER_RENDERER_HOST_RECENTLY_DESTROYED_HOSTS_H_
#define CONTENT_BROWSER_RENDERER_HOST_RECENTLY_DESTROYED_HOSTS_H_

#include "base/containers/flat_set.h"
#include "base/supports_user_data.h"
#include "base/time/time.h"
#include "content/common/content_export.h"

namespace base {
class TimeDelta;
class TimeTicks;
}  // namespace base

namespace content {

class BrowserContext;
class ProcessLock;
class RenderProcessHost;

// Stores information about recently destroyed RenderProcessHosts in order to
// determine how often a process is created for a site that a just-destroyed
// host could have hosted. Emits the "SiteIsolation.ReusePendingOrCommittedSite.
// TimeSinceReusableProcessDestroyed" metric, which tracks this.
//
// Experimentally used to delay subframe-process shutdown. This aims to reduce
// process churn by keeping subframe processes alive for a few seconds. See
// GetSubframeProcessShutdownDelay() for details.
class CONTENT_EXPORT RecentlyDestroyedHosts
    : public base::SupportsUserData::Data {};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_RECENTLY_DESTROYED_HOSTS_H_