#include "content/browser/renderer_host/recently_destroyed_hosts.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/time.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/process_lock.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_process_host.h"
namespace content {
namespace {
const void* const kRecentlyDestroyedHostTrackerKey = …;
constexpr base::TimeDelta kRecentlyDestroyedNotFoundSentinel = …;
void RecordMetric(base::TimeDelta value) { … }
}
constexpr base::TimeDelta
RecentlyDestroyedHosts::kRecentlyDestroyedStorageTimeout;
RecentlyDestroyedHosts::~RecentlyDestroyedHosts() = default;
void RecentlyDestroyedHosts::RecordMetricIfReusableHostRecentlyDestroyed(
const base::TimeTicks& reusable_host_lookup_time,
const ProcessLock& process_lock,
BrowserContext* browser_context) { … }
void RecentlyDestroyedHosts::Add(
RenderProcessHost* host,
const base::TimeDelta& time_spent_running_unload_handlers,
BrowserContext* browser_context) { … }
RecentlyDestroyedHosts::RecentlyDestroyedHosts() = default;
RecentlyDestroyedHosts* RecentlyDestroyedHosts::GetInstance(
BrowserContext* browser_context) { … }
void RecentlyDestroyedHosts::RemoveExpiredEntries() { … }
void RecentlyDestroyedHosts::AddReuseInterval(const base::TimeDelta& interval) { … }
}