chromium/components/autofill/content/renderer/password_form_conversion_utils.cc

// Copyright 2013 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/autofill/content/renderer/password_form_conversion_utils.h"

#include "base/lazy_instance.h"
#include "base/no_destructor.h"
#include "base/strings/string_split.h"
#include "components/autofill/content/renderer/html_based_username_detector.h"
#include "components/autofill/content/renderer/timing.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/unique_ids.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "net/base/url_util.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_form_control_element.h"
#include "third_party/blink/public/web/web_input_element.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/re2/src/re2/re2.h"
#include "url/gurl.h"

WebElement;
WebFormControlElement;
WebFormElement;
WebInputElement;
WebLocalFrame;
WebString;

namespace autofill {

ExtractOption;

namespace {

const char kPasswordSiteUrlRegex[] =;

struct PasswordSiteUrlLazyInstanceTraits
    : public base::internal::DestructorAtExitLazyInstanceTraits<re2::RE2> {};

base::LazyInstance<re2::RE2, PasswordSiteUrlLazyInstanceTraits>
    g_password_site_matcher =;

// Extracts the username predictions. |control_elements| should be all the DOM
// elements of the form, |form_data| should be the already extracted FormData
// representation of that form. |username_detector_cache| is optional, and can
// be used to spare recomputation if called multiple times for the same form.
std::vector<FieldRendererId> GetUsernamePredictions(
    const FormData& form_data,
    UsernameDetectorCache* username_detector_cache) {}

}  // namespace

re2::RE2* CreateMatcher(void* instance, const char* pattern) {}

bool IsGaiaReauthenticationForm(const blink::WebFormElement& form) {}

bool IsGaiaWithSkipSavePasswordForm(const blink::WebFormElement& form) {}

std::optional<FormData> CreateFormDataFromWebForm(
    const WebFormElement& web_form,
    const FieldDataManager& field_data_manager,
    UsernameDetectorCache* username_detector_cache,
    form_util::ButtonTitlesCache* button_titles_cache,
    const CallTimerState& timer_state) {}

std::optional<FormData> CreateFormDataFromUnownedInputElements(
    const WebLocalFrame& frame,
    const FieldDataManager& field_data_manager,
    UsernameDetectorCache* username_detector_cache,
    form_util::ButtonTitlesCache* button_titles_cache,
    const CallTimerState& timer_state) {}

std::string GetSignOnRealm(const GURL& origin) {}

}  // namespace autofill