#include "components/security_interstitials/content/captive_portal_blocking_page.h"
#include <utility>
#include "base/i18n/rtl.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "components/captive_portal/core/captive_portal_detector.h"
#include "components/captive_portal/core/captive_portal_metrics.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/core/controller_client.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/strings/grit/components_strings.h"
#include "components/url_formatter/url_formatter.h"
#include "components/wifi/wifi_service.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/ssl_status.h"
#include "content/public/browser/web_contents.h"
#include "net/base/network_change_notifier.h"
#include "net/base/network_interfaces.h"
#include "net/ssl/ssl_info.h"
#include "ui/base/l10n/l10n_util.h"
#if BUILDFLAG(IS_ANDROID)
#include "net/android/network_library.h"
#endif
const void* const CaptivePortalBlockingPage::kTypeForTesting = …;
CaptivePortalBlockingPage::CaptivePortalBlockingPage(
content::WebContents* web_contents,
const GURL& request_url,
const GURL& login_url,
bool can_show_enhanced_protection_message,
const net::SSLInfo& ssl_info,
std::unique_ptr<
security_interstitials::SecurityInterstitialControllerClient>
controller_client,
const OpenLoginCallback& open_login_callback)
: … { … }
CaptivePortalBlockingPage::~CaptivePortalBlockingPage() = default;
const void* CaptivePortalBlockingPage::GetTypeForTesting() { … }
void CaptivePortalBlockingPage::OverrideWifiInfoForTesting(
bool is_wifi_connection,
const std::string& wifi_ssid) { … }
bool CaptivePortalBlockingPage::IsWifiConnection() const { … }
std::string CaptivePortalBlockingPage::GetWiFiSSID() const { … }
void CaptivePortalBlockingPage::PopulateInterstitialStrings(
base::Value::Dict& load_time_data) { … }
void CaptivePortalBlockingPage::CommandReceived(const std::string& command) { … }