chromium/chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h

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

#ifndef CHROME_BROWSER_SSL_KNOWN_INTERCEPTION_DISCLOSURE_INFOBAR_DELEGATE_H_
#define CHROME_BROWSER_SSL_KNOWN_INTERCEPTION_DISCLOSURE_INFOBAR_DELEGATE_H_

#include <algorithm>
#include "base/memory/raw_ptr.h"
#include "base/memory/singleton.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar_delegate.h"
#include "net/cert/cert_status_flags.h"
#include "url/gurl.h"

namespace base {
class Clock;
}  // namespace base

namespace content {
class WebContents;
}

namespace user_prefs {
class PrefRegistrySyncable;
}  // namespace user_prefs

class Profile;

// Singleton that tracks the known interception disclosure cooldown time. On
// Android, this is measured across browser sessions (which tend to be short) by
// storing the last dismissal time in a pref. On Desktop, the last dismissal
// time is stored in memory, so this is is only measured within the same
// browsing session (and thus will trigger on every browser startup).
class KnownInterceptionDisclosureCooldown {};

// Shows the known interception disclosure UI if it has not been recently
// dismissed.
void MaybeShowKnownInterceptionDisclosureDialog(
    content::WebContents* web_contents,
    net::CertStatus cert_status);

class KnownInterceptionDisclosureInfoBarDelegate
    : public ConfirmInfoBarDelegate {};

#endif  // CHROME_BROWSER_SSL_KNOWN_INTERCEPTION_DISCLOSURE_INFOBAR_DELEGATE_H_