chromium/components/security_interstitials/core/https_only_mode_enforcelist.cc

// Copyright 2023 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_enforcelist.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/common/content_settings_utils.h"
#include "components/security_interstitials/core/https_only_mode_metrics.h"

namespace {

SiteEngagementHeuristicState;

// Key in the HTTPS_ENFORCED website setting dictionary to indicate whether
// HTTPS-First Mode is enabled on the site.
const char kEnabledKey[] =;

// Key in the HTTPS_ENFORCED website setting dictionary to store the
// timestamp when HTTPS-First Mode is enabled on the site.
const char kAdditionTimestamp[] =;

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

HttpsOnlyModeEnforcelist::HttpsOnlyModeEnforcelist(
    HostContentSettingsMap* host_content_settings_map,
    base::Clock* clock)
    :{}

HttpsOnlyModeEnforcelist::~HttpsOnlyModeEnforcelist() = default;

void HttpsOnlyModeEnforcelist::EnforceForHost(const std::string& host,
                                              bool is_nondefault_storage) {}

void HttpsOnlyModeEnforcelist::UnenforceForHost(const std::string& host,
                                                bool is_nondefault_storage) {}

bool HttpsOnlyModeEnforcelist::IsEnforcedForUrl(
    const GURL& url,
    bool is_nondefault_storage) const {}

std::set<GURL> HttpsOnlyModeEnforcelist::GetHosts(
    bool is_nondefault_storage) const {}

void HttpsOnlyModeEnforcelist::RevokeEnforcements(const std::string& host) {}

void HttpsOnlyModeEnforcelist::Clear(
    base::Time delete_begin,
    base::Time delete_end,
    const HostContentSettingsMap::PatternSourcePredicate& pattern_filter) {}

void HttpsOnlyModeEnforcelist::ClearEnforcements(base::Time delete_begin,
                                                 base::Time delete_end) {}

void HttpsOnlyModeEnforcelist::RecordMetrics(bool is_nondefault_storage) {}

void HttpsOnlyModeEnforcelist::SetClockForTesting(base::Clock* clock) {}

}  // namespace security_interstitials