#include "chrome/browser/preloading/navigation_ablation_throttle.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/pattern.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/search_engines/search_terms_data.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/web_contents.h"
namespace {
BASE_FEATURE(…);
const base::FeatureParam<base::TimeDelta> kNavigationLatencyAblationDuration{ … };
const base::FeatureParam<std::string> kAblationTargetPattern{ … };
const base::FeatureParam<bool> kShouldAblateDefaultSearchQueries{ … };
const base::FeatureParam<bool> kShouldAblateDefaultSearchHost{ … };
const base::FeatureParam<bool> kShouldAblateNonDefaultSearchHost{ … };
enum class AblationType { … };
constexpr char kNavigationAblationThrottleName[] = …;
AblationType GetAblationType(const GURL& navigation_url,
content::BrowserContext* browser_context) { … }
bool ShouldCreateThrottle(content::NavigationHandle* navigation) { … }
class NavigationAblationThrottle : public content::NavigationThrottle { … };
}
std::unique_ptr<content::NavigationThrottle>
MaybeCreateNavigationAblationThrottle(content::NavigationHandle* navigation) { … }