Commit 096c4b68 authored by Anastasiia N's avatar Anastasiia N Committed by Commit Bot

[Lacros] Rename InlineLoginDialogChromeOS::Show to ShowDeprecated

InlineLoginDialogChromeOS::ShowDeprecated will be removed when all
calls to the dialog will be migrated to call AccountManagerFacade
instead.

Bug: 1140469
Change-Id: Ide858dffd4253ab9088a33dc1a4303522428f367
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2550681
Commit-Queue: Anastasiia N <anastasiian@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831870}
parent 834c02de
......@@ -512,7 +512,7 @@ void ArcAuthService::IsAccountManagerAvailable(
void ArcAuthService::HandleAddAccountRequest() {
DCHECK(chromeos::IsAccountManagerAvailable(profile_));
chromeos::InlineLoginDialogChromeOS::Show(
chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
chromeos::InlineLoginDialogChromeOS::Source::kArc);
}
......@@ -526,7 +526,7 @@ void ArcAuthService::HandleRemoveAccountRequest(const std::string& email) {
void ArcAuthService::HandleUpdateCredentialsRequest(const std::string& email) {
DCHECK(chromeos::IsAccountManagerAvailable(profile_));
chromeos::InlineLoginDialogChromeOS::Show(
chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
email, chromeos::InlineLoginDialogChromeOS::Source::kArc);
}
......
......@@ -282,7 +282,7 @@ void ProcessMirrorHeader(
}
// Display a re-authentication dialog.
chromeos::InlineLoginDialogChromeOS::Show(
chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
manage_accounts_params.email,
chromeos::InlineLoginDialogChromeOS::Source::kContentArea);
return;
......
......@@ -56,8 +56,8 @@ class MigrationMessageHandler : public content::WebUIMessageHandler {
CHECK(!args->GetList().empty());
const std::string& account_email = args->GetList()[0].GetString();
InlineLoginDialogChromeOS::Show(account_email,
InlineLoginDialogChromeOS::Source::
InlineLoginDialogChromeOS::ShowDeprecated(
account_email, InlineLoginDialogChromeOS::Source::
kAccountManagerMigrationWelcomeScreen);
HandleCloseDialog(args);
}
......
......@@ -823,7 +823,7 @@ void PrintPreviewHandler::HandleSignin(const base::ListValue* /*args*/) {
// Chrome OS Account Manager is enabled on this Profile and hence, all
// account management flows will go through native UIs and not through a
// tabbed browser window.
chromeos::InlineLoginDialogChromeOS::Show(
chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
chromeos::InlineLoginDialogChromeOS::Source::kPrintPreviewDialog);
return;
}
......
......@@ -343,7 +343,7 @@ base::ListValue AccountManagerUIHandler::GetSecondaryGaiaAccounts(
void AccountManagerUIHandler::HandleAddAccount(const base::ListValue* args) {
AllowJavascript();
InlineLoginDialogChromeOS::Show(
InlineLoginDialogChromeOS::ShowDeprecated(
InlineLoginDialogChromeOS::Source::kSettingsAddAccountButton);
}
......@@ -354,7 +354,7 @@ void AccountManagerUIHandler::HandleReauthenticateAccount(
CHECK(!args->GetList().empty());
const std::string& account_email = args->GetList()[0].GetString();
InlineLoginDialogChromeOS::Show(
InlineLoginDialogChromeOS::ShowDeprecated(
account_email,
InlineLoginDialogChromeOS::Source::kSettingsReauthAccountButton);
}
......
......@@ -98,7 +98,7 @@ const char InlineLoginDialogChromeOS::kAccountAdditionSource[] =
"AccountManager.AccountAdditionSource";
// static
void InlineLoginDialogChromeOS::Show(const std::string& email,
void InlineLoginDialogChromeOS::ShowDeprecated(const std::string& email,
const Source& source) {
base::UmaHistogramEnumeration(kAccountAdditionSource, source);
// If the dialog was triggered as a response to background request, it could
......@@ -124,8 +124,8 @@ void InlineLoginDialogChromeOS::Show(const std::string& email,
->SetBackdropType(ash::WindowBackdrop::BackdropType::kSemiOpaque);
}
void InlineLoginDialogChromeOS::Show(const Source& source) {
Show(/* email= */ std::string(), source);
void InlineLoginDialogChromeOS::ShowDeprecated(const Source& source) {
ShowDeprecated(/* email= */ std::string(), source);
}
// static
......
......@@ -69,11 +69,15 @@ class InlineLoginDialogChromeOS : public SystemWebDialogDelegate,
// Displays the dialog. |email| pre-fills the account email field in the
// sign-in dialog - useful for account re-authentication. |source| specifies
// the source UX surface used for launching the dialog.
static void Show(const std::string& email, const Source& source);
// DEPRECATED: Use AccountManagerFacade instead (see
// https://crbug.com/1140469).
static void ShowDeprecated(const std::string& email, const Source& source);
// Displays the dialog for account addition. |source| specifies the source UX
// surface used for launching the dialog.
static void Show(const Source& source);
// DEPRECATED: Use AccountManagerFacade instead (see
// https://crbug.com/1140469).
static void ShowDeprecated(const Source& source);
// Updates the value of the last reached step in 'Add Account' flow for child
// users. Before the dialog will close, this value will be reported to UMA.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment