chromium/components/safety_check/safety_check.h

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

#ifndef COMPONENTS_SAFETY_CHECK_SAFETY_CHECK_H_
#define COMPONENTS_SAFETY_CHECK_SAFETY_CHECK_H_

#include "base/observer_list_types.h"
#include "components/prefs/pref_service.h"

// Utilities for performing browser safety checks common to desktop, Android,
// and iOS. Platform-specific checks, such as updates and extensions, are
// implemented in handlers.
namespace safety_check {

// The following enums represent the state of each component (common among
// desktop, Android, and iOS) of the safety check and should be kept in sync
// with the JS frontend (safety_check_browser_proxy.ts) and |SafetyCheck*|
// metrics enums in enums.xml.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.safety_check
enum class PasswordsStatus {};

// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.safety_check
enum class SafeBrowsingStatus {};

// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.safety_check
enum class UpdateStatus {};

// Gets the status of Safe Browsing from the PrefService and invokes
// OnSafeBrowsingCheckResult on each Observer with results.
SafeBrowsingStatus CheckSafeBrowsing(PrefService* pref_service);

}  // namespace safety_check

#endif  // COMPONENTS_SAFETY_CHECK_SAFETY_CHECK_H_