blob: 6bf21cce34d97c7a8d10400a82a2c69648ac070e [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/callback_forward.h"
class GURL;
namespace network {
namespace mojom {
class NetworkContext;
} // namespace network
namespace password_manager {
enum class HSTSResult { kNo, kYes, kError };
using HSTSCallback = base::OnceCallback<void(HSTSResult)>;
// Checks asynchronously whether HTTP Strict Transport Security (HSTS) is active
// for the host of the given origin for a given network context. Notifies
// |callback| with the result on the calling thread. Should be called from the
// thread the network context lives on (in things based on content/ the UI
// thread).
void PostHSTSQueryForHostAndNetworkContext(
const GURL& origin,
network::mojom::NetworkContext* network_context,
HSTSCallback callback);
} // namespace password_manager