#include "extensions/renderer/extension_throttle_manager.h"
#include <map>
#include <utility>
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
#include "extensions/common/constants.h"
#include "extensions/renderer/extension_url_loader_throttle.h"
#include "net/base/url_util.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/platform/web_url.h"
namespace extensions {
const unsigned int ExtensionThrottleManager::kMaximumNumberOfEntries = …;
const unsigned int ExtensionThrottleManager::kRequestsBetweenCollecting = …;
ExtensionThrottleManager::ExtensionThrottleManager()
: … { … }
ExtensionThrottleManager::~ExtensionThrottleManager() { … }
std::unique_ptr<blink::URLLoaderThrottle>
ExtensionThrottleManager::MaybeCreateURLLoaderThrottle(
const network::ResourceRequest& request) { … }
ExtensionThrottleEntry* ExtensionThrottleManager::RegisterRequestUrl(
const GURL& url) { … }
bool ExtensionThrottleManager::ShouldRejectRequest(const GURL& request_url) { … }
bool ExtensionThrottleManager::ShouldRejectRedirect(
const GURL& request_url,
const net::RedirectInfo& redirect_info) { … }
void ExtensionThrottleManager::WillProcessResponse(
const GURL& response_url,
const network::mojom::URLResponseHead& response_head) { … }
void ExtensionThrottleManager::SetBackoffPolicyForTests(
std::unique_ptr<net::BackoffEntry::Policy> policy) { … }
void ExtensionThrottleManager::OverrideEntryForTests(
const GURL& url,
std::unique_ptr<ExtensionThrottleEntry> entry) { … }
void ExtensionThrottleManager::EraseEntryForTests(const GURL& url) { … }
void ExtensionThrottleManager::SetOnline(bool is_online) { … }
std::string ExtensionThrottleManager::GetIdFromUrl(const GURL& url) const { … }
void ExtensionThrottleManager::GarbageCollectEntriesIfNecessary() { … }
void ExtensionThrottleManager::GarbageCollectEntries() { … }
}