#include "extensions/browser/api/declarative_webrequest/webrequest_condition.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "components/url_matcher/url_matcher_factory.h"
#include "extensions/browser/api/declarative_webrequest/request_stage.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.h"
#include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
#include "extensions/browser/api/web_request/web_request_info.h"
URLMatcherConditionFactory;
URLMatcherConditionSet;
URLMatcherFactory;
keys;
namespace {
static base::MatcherStringPattern::ID g_next_id = …;
const char kExpectedDictionary[] = …;
const char kConditionWithoutInstanceType[] = …;
const char kExpectedOtherConditionType[] = …;
const char kInvalidTypeOfParamter[] = …;
const char kConditionCannotBeFulfilled[] = …;
}
namespace extensions {
keys;
WebRequestData::WebRequestData(const WebRequestInfo* request,
RequestStage stage)
: … { … }
WebRequestData::WebRequestData(
const WebRequestInfo* request,
RequestStage stage,
const net::HttpResponseHeaders* original_response_headers)
: … { … }
WebRequestData::~WebRequestData() = default;
WebRequestDataWithMatchIds::WebRequestDataWithMatchIds(
const WebRequestData* request_data)
: … { … }
WebRequestDataWithMatchIds::~WebRequestDataWithMatchIds() = default;
WebRequestCondition::WebRequestCondition(
scoped_refptr<URLMatcherConditionSet> url_matcher_conditions,
const WebRequestConditionAttributes& condition_attributes)
: … { … }
WebRequestCondition::~WebRequestCondition() = default;
bool WebRequestCondition::IsFulfilled(
const MatchData& request_data) const { … }
void WebRequestCondition::GetURLMatcherConditionSets(
URLMatcherConditionSet::Vector* condition_sets) const { … }
std::unique_ptr<WebRequestCondition> WebRequestCondition::Create(
const Extension* extension,
URLMatcherConditionFactory* url_matcher_condition_factory,
const base::Value& condition,
std::string* error) { … }
}