#include "chrome/browser/supervised_user/classify_url_navigation_throttle.h"
#include <list>
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include "base/metrics/histogram_functions.h"
#include "base/task/single_thread_task_runner.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/supervised_user/supervised_user_browser_utils.h"
#include "chrome/browser/supervised_user/supervised_user_navigation_observer.h"
#include "chrome/browser/supervised_user/supervised_user_navigation_throttle.h"
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#include "components/signin/public/identity_manager/tribool.h"
#include "components/supervised_user/core/browser/supervised_user_capabilities.h"
#include "components/supervised_user/core/browser/supervised_user_interstitial.h"
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/browser/supervised_user_service.h"
#include "components/supervised_user/core/browser/supervised_user_url_filter.h"
#include "components/supervised_user/core/browser/supervised_user_utils.h"
#include "components/supervised_user/core/common/supervised_user_constants.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/web_contents.h"
#include "supervised_user_navigation_throttle.h"
#include "url/gurl.h"
namespace supervised_user {
namespace {
const char kClassifyUrlThrottleStatus[] = …;
std::ostream& operator<<(std::ostream& stream,
ClassifyUrlThrottleStatus status) { … }
}
ClassifyUrlNavigationThrottle::ThrottleCheckResult
ClassifyUrlNavigationThrottle::WillProcessRequest() { … }
ClassifyUrlNavigationThrottle::ThrottleCheckResult
ClassifyUrlNavigationThrottle::WillStartRequest() { … }
ClassifyUrlNavigationThrottle::ThrottleCheckResult
ClassifyUrlNavigationThrottle::WillRedirectRequest() { … }
ClassifyUrlNavigationThrottle::ThrottleCheckResult
ClassifyUrlNavigationThrottle::WillProcessResponse() { … }
bool ClassifyUrlNavigationThrottle::IsDecided() const { … }
std::list<ClassifyUrlNavigationThrottle::Check>::const_iterator
ClassifyUrlNavigationThrottle::FirstBlockingCheck() const { … }
void ClassifyUrlNavigationThrottle::SetCheck(const GURL& url,
const CheckResult& result) { … }
void ClassifyUrlNavigationThrottle::CheckURL() { … }
void ClassifyUrlNavigationThrottle::OnURLCheckDone(
const GURL& url,
FilteringBehavior behavior,
FilteringBehaviorReason reason,
bool uncertain) { … }
void ClassifyUrlNavigationThrottle::ScheduleInterstitial(Check check) { … }
void ClassifyUrlNavigationThrottle::ShowInterstitial(Check check) { … }
void ClassifyUrlNavigationThrottle::OnInterstitialResult(
Check check,
SupervisedUserNavigationThrottle::CallbackActions action,
bool already_sent_request,
bool is_main_frame) { … }
const GURL& ClassifyUrlNavigationThrottle::currently_navigated_url() const { … }
std::unique_ptr<content::NavigationThrottle>
MaybeCreateClassifyUrlNavigationThrottleFor(
content::NavigationHandle* navigation_handle) { … }
std::optional<ClassifyUrlNavigationThrottle::ThrottleCheckResult>
ClassifyUrlNavigationThrottle::NextNavigationState(
ClassifyUrlThrottleStatus status) { … }
ClassifyUrlNavigationThrottle::ThrottleCheckResult
ClassifyUrlNavigationThrottle::DeferAndScheduleInterstitial(Check check) { … }
void ClassifyUrlNavigationThrottle::CancelDeferredNavigation(
ThrottleCheckResult result) { … }
std::unique_ptr<ClassifyUrlNavigationThrottle>
ClassifyUrlNavigationThrottle::MakeUnique(
content::NavigationHandle* navigation_handle) { … }
const char* ClassifyUrlNavigationThrottle::GetNameForLogging() { … }
ClassifyUrlNavigationThrottle::ClassifyUrlNavigationThrottle(
content::NavigationHandle* navigation_handle)
: … { … }
ClassifyUrlNavigationThrottle::~ClassifyUrlNavigationThrottle() = default;
}