chromium/components/security_interstitials/core/https_only_mode_allowlist.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Key for the expiration time of a decision in the per-site HTTP allowlist
// content settings dictionary.
const char kHTTPAllowlistExpirationTimeKey[] =;

// All SSL decisions are per host (and are shared arcoss schemes), so this
// canonicalizes all hosts into a secure scheme GURL to use with content
// settings. The returned GURL will be the passed in host with an empty path and
// https:// as the scheme.
GURL GetSecureGURLForHost(const std::string& host) {}

}  // namespace

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) {}

}  // namespace security_interstitials