#include "extensions/browser/api/web_request/web_request_event_details.h"
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/strings/string_number_conversions.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_host.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/web_request/upload_data_presenter.h"
#include "extensions/browser/api/web_request/web_request_api_constants.h"
#include "extensions/browser/api/web_request/web_request_api_helpers.h"
#include "extensions/browser/api/web_request/web_request_info.h"
#include "extensions/browser/api/web_request/web_request_permissions.h"
#include "extensions/browser/api/web_request/web_request_resource_type.h"
#include "extensions/common/permissions/permissions_data.h"
#include "net/base/auth.h"
#include "net/base/upload_data_stream.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
ExtraInfoSpec;
helpers;
keys;
namespace extensions {
namespace {
void EraseHeadersIf(
base::Value::List& headers,
base::RepeatingCallback<bool(const std::string&)> predicate) { … }
}
WebRequestEventDetails::WebRequestEventDetails(const WebRequestInfo& request,
int extra_info_spec)
: … { … }
WebRequestEventDetails::~WebRequestEventDetails() = default;
void WebRequestEventDetails::SetRequestBody(WebRequestInfo* request) { … }
void WebRequestEventDetails::SetRequestHeaders(
const net::HttpRequestHeaders& request_headers) { … }
void WebRequestEventDetails::SetAuthInfo(
const net::AuthChallengeInfo& auth_info) { … }
void WebRequestEventDetails::SetResponseHeaders(
const WebRequestInfo& request,
const net::HttpResponseHeaders* response_headers) { … }
void WebRequestEventDetails::SetResponseSource(const WebRequestInfo& request) { … }
base::Value::Dict WebRequestEventDetails::GetFilteredDict(
int extra_info_spec,
PermissionHelper* permission_helper,
const extensions::ExtensionId& extension_id,
bool crosses_incognito) const { … }
base::Value::Dict WebRequestEventDetails::GetAndClearDict() { … }
}