// 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_BROWSER_UTIL_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_BROWSER_UTIL_H_

#include <stddef.h>

#include "components/autofill/core/common/form_data.h"

namespace autofill {

class AutofillClient;
class FormStructure;

// Checks whether a given form is considered mixed content. A form is mixed
// content if is displayed on a secure context, but submits to an insecure one.
bool IsFormMixedContent(const AutofillClient& client, const FormData& form);

// Returns true if `form` is considered "perfectly filled".
//
// A form is perfectly filled if the user did not have to manually type into any
// field that Autofill didn't assist with.
bool IsFormStructurePerfectlyFilled(const FormStructure& form);

}  // namespace autofill

#endif  // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_BROWSER_UTIL_H_
