#include "chrome/browser/request_header_integrity/request_header_integrity_url_loader_throttle.h"
#include <string>
#include "base/base64.h"
#include "base/containers/span.h"
#include "base/feature_list.h"
#include "base/hash/sha1.h"
#include "base/strings/string_util.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/request_header_integrity/build_derived_values.h"
#include "chrome/common/channel_info.h"
#include "components/embedder_support/user_agent_utils.h"
#include "components/google/core/common/google_util.h"
#include "google_apis/google_api_keys.h"
#include "services/network/public/cpp/resource_request.h"
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include "chrome/browser/request_header_integrity/internal/google_header_names.h"
#endif
#if !defined(CHANNEL_NAME_HEADER_NAME)
#define CHANNEL_NAME_HEADER_NAME …
#endif
#if !defined(LASTCHANGE_YEAR_HEADER_NAME)
#define LASTCHANGE_YEAR_HEADER_NAME …
#endif
#if !defined(VALIDATE_HEADER_NAME)
#define VALIDATE_HEADER_NAME …
#endif
#if !defined(COPYRIGHT_HEADER_NAME)
#define COPYRIGHT_HEADER_NAME …
#endif
namespace request_header_integrity {
namespace {
BASE_FEATURE(…);
std::string GetChannelName() { … }
}
RequestHeaderIntegrityURLLoaderThrottle::
RequestHeaderIntegrityURLLoaderThrottle() = default;
RequestHeaderIntegrityURLLoaderThrottle::
~RequestHeaderIntegrityURLLoaderThrottle() = default;
void RequestHeaderIntegrityURLLoaderThrottle::WillStartRequest(
network::ResourceRequest* request,
bool* defer) { … }
bool RequestHeaderIntegrityURLLoaderThrottle::IsFeatureEnabled() { … }
}