#include "components/captive_portal/core/captive_portal_detector.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/load_flags.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "url/gurl.h"
namespace captive_portal {
const char CaptivePortalDetector::kDefaultURL[] = …;
CaptivePortalDetector::CaptivePortalDetector(
network::mojom::URLLoaderFactory* loader_factory)
: … { … }
CaptivePortalDetector::~CaptivePortalDetector() { … }
void CaptivePortalDetector::DetectCaptivePortal(
const GURL& url,
DetectionCallback detection_callback,
const net::NetworkTrafficAnnotationTag& traffic_annotation) { … }
void CaptivePortalDetector::StartProbe(
const net::NetworkTrafficAnnotationTag& traffic_annotation,
const GURL& url) { … }
void CaptivePortalDetector::Cancel() { … }
void CaptivePortalDetector::OnSimpleLoaderComplete(
std::unique_ptr<std::string> response_body) { … }
void CaptivePortalDetector::OnSimpleLoaderCompleteInternal(
int net_error,
int response_code,
std::optional<size_t> content_length,
const GURL& url,
net::HttpResponseHeaders* headers) { … }
void CaptivePortalDetector::GetCaptivePortalResultFromResponse(
int net_error,
int response_code,
std::optional<size_t> content_length,
const GURL& url,
net::HttpResponseHeaders* headers,
Results* results) const { … }
base::Time CaptivePortalDetector::GetCurrentTime() const { … }
bool CaptivePortalDetector::FetchingURL() const { … }
}