#include "chrome/browser/ui/passwords/ui_utils.h"
#include <stddef.h>
#include <algorithm>
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "build/branding_buildflags.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/sync_service_factory.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/affiliations/core/browser/affiliation_utils.h"
#include "components/password_manager/core/browser/leak_detection_dialog_utils.h"
#include "components/password_manager/core/browser/password_form.h"
#include "components/password_manager/core/browser/password_manager_client.h"
#include "components/password_manager/core/browser/password_manager_constants.h"
#include "components/password_manager/core/browser/password_manager_util.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/service/sync_service.h"
#include "components/sync/service/sync_user_settings.h"
#include "components/url_formatter/elide_url.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/web_contents.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "url/gurl.h"
#include "url/origin.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/user_education/show_promo_in_page.h"
#include "chrome/browser/ui/webui/password_manager/password_manager_ui.h"
#endif
namespace {
ManagePasswordsReferrer;
bool SameDomainOrHost(const GURL& gurl, const url::Origin& origin) { … }
}
gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia skia_image) { … }
std::pair<std::u16string, std::u16string> GetCredentialLabelsForAccountChooser(
const password_manager::PasswordForm& form) { … }
std::u16string GetSavePasswordDialogTitleText(
const GURL& user_visible_url,
const url::Origin& form_origin_url,
PasswordTitleType dialog_type) { … }
std::u16string GetManagePasswordsDialogTitleText(
const GURL& user_visible_url,
const url::Origin& password_origin_url,
bool has_credentials) { … }
std::u16string GetConfirmationManagePasswordsDialogTitleText(bool is_update) { … }
std::u16string GetDisplayUsername(const password_manager::PasswordForm& form) { … }
std::u16string GetDisplayUsername(
const password_manager::UiCredential& credential) { … }
std::u16string GetDisplayFederation(
const password_manager::PasswordForm& form) { … }
std::u16string GetDisplayPassword(const password_manager::PasswordForm& form) { … }
bool IsSyncingAutosignSetting(Profile* profile) { … }
GURL GetGooglePasswordManagerURL(ManagePasswordsReferrer referrer) { … }
std::string GetGooglePasswordManagerSubPageURLStr() { … }
#if !BUILDFLAG(IS_ANDROID)
void NavigateToManagePasswordsPage(Browser* browser,
ManagePasswordsReferrer referrer) { … }
void NavigateToPasswordDetailsPage(Browser* browser,
const std::string& password_domain_name,
ManagePasswordsReferrer referrer) { … }
void NavigateToManagePasswordsSettingsAccountStoreToggle(Browser* browser) { … }
void NavigateToPasswordCheckupPage(Profile* profile) { … }
#endif
mojo::Remote<network::mojom::URLLoaderFactory> GetURLLoaderForMainFrame(
content::WebContents* web_contents) { … }
const gfx::VectorIcon& GooglePasswordManagerVectorIcon() { … }