#include "components/safe_browsing/content/renderer/phishing_classifier/phishing_dom_feature_extractor.h"
#include <memory>
#include <utility>
#include "base/compiler_specific.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/default_tick_clock.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "components/safe_browsing/content/renderer/phishing_classifier/features.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_element.h"
#include "third_party/blink/public/web/web_element_collection.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/public/web/web_view.h"
namespace safe_browsing {
const int PhishingDOMFeatureExtractor::kMaxTimePerChunkMs = …;
const int PhishingDOMFeatureExtractor::kClockCheckGranularity = …;
const int PhishingDOMFeatureExtractor::kMaxTotalTimeMs = …;
struct PhishingDOMFeatureExtractor::PageFeatureState { … };
struct PhishingDOMFeatureExtractor::FrameData { … };
PhishingDOMFeatureExtractor::PhishingDOMFeatureExtractor()
: … { … }
PhishingDOMFeatureExtractor::~PhishingDOMFeatureExtractor() { … }
void PhishingDOMFeatureExtractor::ExtractFeatures(blink::WebDocument document,
FeatureMap* features,
DoneCallback done_callback) { … }
void PhishingDOMFeatureExtractor::CancelPendingExtraction() { … }
void PhishingDOMFeatureExtractor::ExtractFeaturesWithTimeout() { … }
void PhishingDOMFeatureExtractor::HandleLink(const blink::WebElement& element) { … }
void PhishingDOMFeatureExtractor::HandleForm(const blink::WebElement& element) { … }
void PhishingDOMFeatureExtractor::HandleImage(
const blink::WebElement& element) { … }
void PhishingDOMFeatureExtractor::HandleInput(
const blink::WebElement& element) { … }
void PhishingDOMFeatureExtractor::HandleScript(
const blink::WebElement& element) { … }
void PhishingDOMFeatureExtractor::RunCallback(bool success) { … }
void PhishingDOMFeatureExtractor::Clear() { … }
void PhishingDOMFeatureExtractor::ResetFrameData() { … }
blink::WebDocument PhishingDOMFeatureExtractor::GetNextDocument() { … }
bool PhishingDOMFeatureExtractor::IsExternalDomain(const GURL& url,
std::string* domain) const { … }
blink::WebURL PhishingDOMFeatureExtractor::CompleteURL(
const blink::WebElement& element,
const blink::WebString& partial_url) { … }
void PhishingDOMFeatureExtractor::InsertFeatures() { … }
}