#include "components/safe_browsing/content/browser/password_protection/password_protection_service.h"
#include "content/public/browser/browser_thread.h"
#include <stddef.h>
#include <memory>
#include <string>
#include "base/metrics/histogram_macros.h"
#include "base/strings/escape.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/browser/password_reuse_detector.h"
#include "components/safe_browsing/content/browser/password_protection/password_protection_commit_deferring_condition.h"
#include "components/safe_browsing/content/browser/password_protection/password_protection_request_content.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/utils.h"
#include "components/zoom/zoom_controller.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "google_apis/google_api_keys.h"
#include "net/base/url_util.h"
#include "third_party/blink/public/common/page/page_zoom.h"
WebContents;
PasswordType;
namespace safe_browsing {
PasswordReuseInfo::PasswordReuseInfo() = default;
PasswordReuseInfo::PasswordReuseInfo(const PasswordReuseInfo& other) = default;
PasswordReuseInfo::~PasswordReuseInfo() = default;
#if defined(ON_FOCUS_PING_ENABLED)
void PasswordProtectionService::MaybeStartPasswordFieldOnFocusRequest(
WebContents* web_contents,
const GURL& main_frame_url,
const GURL& password_form_action,
const GURL& password_form_frame_url,
const std::string& hosted_domain) { … }
#endif
void PasswordProtectionService::MaybeStartProtectedPasswordEntryRequest(
WebContents* web_contents,
const GURL& main_frame_url,
const std::string& username,
PasswordType password_type,
const std::vector<password_manager::MatchingReusedCredential>&
matching_reused_credentials,
bool password_field_exists) { … }
void PasswordProtectionService::StartRequest(
WebContents* web_contents,
const GURL& main_frame_url,
const GURL& password_form_action,
const GURL& password_form_frame_url,
const std::string& username,
PasswordType password_type,
const std::vector<password_manager::MatchingReusedCredential>&
matching_reused_credentials,
LoginReputationClientRequest::TriggerType trigger_type,
bool password_field_exists) { … }
void PasswordProtectionService::StartRequestForTesting(
WebContents* web_contents,
const GURL& main_frame_url,
const GURL& password_form_action,
const GURL& password_form_frame_url,
const std::string& username,
PasswordType password_type,
const std::vector<password_manager::MatchingReusedCredential>&
matching_reused_credentials,
LoginReputationClientRequest::TriggerType trigger_type,
bool password_field_exists) { … }
void PasswordProtectionService::StartRequestInternal(
scoped_refptr<PasswordProtectionRequest> request) { … }
std::unique_ptr<PasswordProtectionCommitDeferringCondition>
PasswordProtectionService::MaybeCreateCommitDeferringCondition(
content::NavigationHandle& navigation_handle) { … }
void PasswordProtectionService::RemoveWarningRequestsByWebContents(
content::WebContents* web_contents) { … }
bool PasswordProtectionService::IsModalWarningShowingInWebContents(
content::WebContents* web_contents) { … }
void PasswordProtectionService::ResumeDeferredNavigationsIfNeeded(
PasswordProtectionRequest* request) { … }
}