#include "content/browser/renderer_host/navigation_throttle_runner.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/metrics_hashes.h"
#include "base/strings/strcat.h"
#include "build/build_config.h"
#include "content/browser/devtools/devtools_instrumentation.h"
#include "content/browser/preloading/prefetch/contamination_delay_navigation_throttle.h"
#include "content/browser/preloading/prefetch/prefetch_features.h"
#include "content/browser/preloading/prerender/prerender_navigation_throttle.h"
#include "content/browser/preloading/prerender/prerender_subframe_navigation_throttle.h"
#include "content/browser/renderer_host/ancestor_throttle.h"
#include "content/browser/renderer_host/back_forward_cache_subframe_navigation_throttle.h"
#include "content/browser/renderer_host/blocked_scheme_navigation_throttle.h"
#include "content/browser/renderer_host/http_error_navigation_throttle.h"
#include "content/browser/renderer_host/isolated_web_app_throttle.h"
#include "content/browser/renderer_host/mixed_content_navigation_throttle.h"
#include "content/browser/renderer_host/navigation_request.h"
#include "content/browser/renderer_host/navigator_delegate.h"
#include "content/browser/renderer_host/renderer_cancellation_throttle.h"
#include "content/browser/renderer_host/subframe_history_navigation_throttle.h"
#include "content/public/browser/navigation_handle.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#if !BUILDFLAG(IS_ANDROID)
#include "content/browser/picture_in_picture/document_picture_in_picture_navigation_throttle.h"
#endif
namespace content {
namespace {
NavigationThrottle::ThrottleCheckResult ExecuteNavigationEvent(
NavigationThrottle* throttle,
NavigationThrottleRunner::Event event) { … }
const char* GetEventName(NavigationThrottleRunner::Event event) { … }
const char* GetEventNameForHistogram(NavigationThrottleRunner::Event event) { … }
base::TimeDelta RecordHistogram(NavigationThrottleRunner::Event event,
base::Time start,
const std::string& metric_type) { … }
base::TimeDelta RecordDeferTimeHistogram(NavigationThrottleRunner::Event event,
base::Time start) { … }
void RecordExecutionTimeHistogram(NavigationThrottleRunner::Event event,
base::Time start) { … }
}
NavigationThrottleRunner::NavigationThrottleRunner(Delegate* delegate,
int64_t navigation_id,
bool is_primary_main_frame)
: … { … }
NavigationThrottleRunner::~NavigationThrottleRunner() { … }
void NavigationThrottleRunner::ProcessNavigationEvent(Event event) { … }
void NavigationThrottleRunner::ResumeProcessingNavigationEvent(
NavigationThrottle* deferring_throttle) { … }
void NavigationThrottleRunner::CallResumeForTesting() { … }
void NavigationThrottleRunner::RegisterNavigationThrottles() { … }
void NavigationThrottleRunner::
RegisterNavigationThrottlesForCommitWithoutUrlLoader() { … }
NavigationThrottle* NavigationThrottleRunner::GetDeferringThrottle() const { … }
void NavigationThrottleRunner::AddThrottle(
std::unique_ptr<NavigationThrottle> navigation_throttle) { … }
void NavigationThrottleRunner::ProcessInternal() { … }
void NavigationThrottleRunner::InformDelegate(
const NavigationThrottle::ThrottleCheckResult& result) { … }
void NavigationThrottleRunner::RecordDeferTimeUKM() { … }
}