#include "components/security_interstitials/core/https_only_mode_allowlist.h"
#include "base/containers/contains.h"
#include "base/json/values_util.h"
#include "base/time/clock.h"
#include "base/values.h"
#include "components/content_settings/core/browser/content_settings_pref_provider.h"
namespace {
const char kHTTPAllowlistExpirationTimeKey[] = …;
GURL GetSecureGURLForHost(const std::string& host) { … }
}
namespace security_interstitials {
HttpsOnlyModeAllowlist::HttpsOnlyModeAllowlist(
HostContentSettingsMap* host_content_settings_map,
base::Clock* clock,
base::TimeDelta expiration_timeout)
: … { … }
HttpsOnlyModeAllowlist::~HttpsOnlyModeAllowlist() = default;
void HttpsOnlyModeAllowlist::AllowHttpForHost(const std::string& host,
bool is_nondefault_storage) { … }
bool HttpsOnlyModeAllowlist::IsHttpAllowedForAnyHost(
bool is_nondefault_storage) const { … }
bool HttpsOnlyModeAllowlist::IsHttpAllowedForHost(
const std::string& host,
bool is_nondefault_storage) const { … }
void HttpsOnlyModeAllowlist::RevokeUserAllowExceptions(
const std::string& host) { … }
void HttpsOnlyModeAllowlist::Clear(
base::Time delete_begin,
base::Time delete_end,
const HostContentSettingsMap::PatternSourcePredicate& pattern_filter) { … }
void HttpsOnlyModeAllowlist::ClearAllowlist(base::Time delete_begin,
base::Time delete_end) { … }
void HttpsOnlyModeAllowlist::SetClockForTesting(base::Clock* clock) { … }
}