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( ...@@ -512,7 +512,7 @@ void ArcAuthService::IsAccountManagerAvailable(
void ArcAuthService::HandleAddAccountRequest() { void ArcAuthService::HandleAddAccountRequest() {
DCHECK(chromeos::IsAccountManagerAvailable(profile_)); DCHECK(chromeos::IsAccountManagerAvailable(profile_));
chromeos::InlineLoginDialogChromeOS::Show( chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
chromeos::InlineLoginDialogChromeOS::Source::kArc); chromeos::InlineLoginDialogChromeOS::Source::kArc);
} }
...@@ -526,7 +526,7 @@ void ArcAuthService::HandleRemoveAccountRequest(const std::string& email) { ...@@ -526,7 +526,7 @@ void ArcAuthService::HandleRemoveAccountRequest(const std::string& email) {
void ArcAuthService::HandleUpdateCredentialsRequest(const std::string& email) { void ArcAuthService::HandleUpdateCredentialsRequest(const std::string& email) {
DCHECK(chromeos::IsAccountManagerAvailable(profile_)); DCHECK(chromeos::IsAccountManagerAvailable(profile_));
chromeos::InlineLoginDialogChromeOS::Show( chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
email, chromeos::InlineLoginDialogChromeOS::Source::kArc); email, chromeos::InlineLoginDialogChromeOS::Source::kArc);
} }
......
...@@ -282,7 +282,7 @@ void ProcessMirrorHeader( ...@@ -282,7 +282,7 @@ void ProcessMirrorHeader(
} }
// Display a re-authentication dialog. // Display a re-authentication dialog.
chromeos::InlineLoginDialogChromeOS::Show( chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
manage_accounts_params.email, manage_accounts_params.email,
chromeos::InlineLoginDialogChromeOS::Source::kContentArea); chromeos::InlineLoginDialogChromeOS::Source::kContentArea);
return; return;
......
...@@ -56,9 +56,9 @@ class MigrationMessageHandler : public content::WebUIMessageHandler { ...@@ -56,9 +56,9 @@ class MigrationMessageHandler : public content::WebUIMessageHandler {
CHECK(!args->GetList().empty()); CHECK(!args->GetList().empty());
const std::string& account_email = args->GetList()[0].GetString(); const std::string& account_email = args->GetList()[0].GetString();
InlineLoginDialogChromeOS::Show(account_email, InlineLoginDialogChromeOS::ShowDeprecated(
InlineLoginDialogChromeOS::Source:: account_email, InlineLoginDialogChromeOS::Source::
kAccountManagerMigrationWelcomeScreen); kAccountManagerMigrationWelcomeScreen);
HandleCloseDialog(args); HandleCloseDialog(args);
} }
......
...@@ -823,7 +823,7 @@ void PrintPreviewHandler::HandleSignin(const base::ListValue* /*args*/) { ...@@ -823,7 +823,7 @@ void PrintPreviewHandler::HandleSignin(const base::ListValue* /*args*/) {
// Chrome OS Account Manager is enabled on this Profile and hence, all // Chrome OS Account Manager is enabled on this Profile and hence, all
// account management flows will go through native UIs and not through a // account management flows will go through native UIs and not through a
// tabbed browser window. // tabbed browser window.
chromeos::InlineLoginDialogChromeOS::Show( chromeos::InlineLoginDialogChromeOS::ShowDeprecated(
chromeos::InlineLoginDialogChromeOS::Source::kPrintPreviewDialog); chromeos::InlineLoginDialogChromeOS::Source::kPrintPreviewDialog);
return; return;
} }
......
...@@ -343,7 +343,7 @@ base::ListValue AccountManagerUIHandler::GetSecondaryGaiaAccounts( ...@@ -343,7 +343,7 @@ base::ListValue AccountManagerUIHandler::GetSecondaryGaiaAccounts(
void AccountManagerUIHandler::HandleAddAccount(const base::ListValue* args) { void AccountManagerUIHandler::HandleAddAccount(const base::ListValue* args) {
AllowJavascript(); AllowJavascript();
InlineLoginDialogChromeOS::Show( InlineLoginDialogChromeOS::ShowDeprecated(
InlineLoginDialogChromeOS::Source::kSettingsAddAccountButton); InlineLoginDialogChromeOS::Source::kSettingsAddAccountButton);
} }
...@@ -354,7 +354,7 @@ void AccountManagerUIHandler::HandleReauthenticateAccount( ...@@ -354,7 +354,7 @@ void AccountManagerUIHandler::HandleReauthenticateAccount(
CHECK(!args->GetList().empty()); CHECK(!args->GetList().empty());
const std::string& account_email = args->GetList()[0].GetString(); const std::string& account_email = args->GetList()[0].GetString();
InlineLoginDialogChromeOS::Show( InlineLoginDialogChromeOS::ShowDeprecated(
account_email, account_email,
InlineLoginDialogChromeOS::Source::kSettingsReauthAccountButton); InlineLoginDialogChromeOS::Source::kSettingsReauthAccountButton);
} }
......
...@@ -98,8 +98,8 @@ const char InlineLoginDialogChromeOS::kAccountAdditionSource[] = ...@@ -98,8 +98,8 @@ const char InlineLoginDialogChromeOS::kAccountAdditionSource[] =
"AccountManager.AccountAdditionSource"; "AccountManager.AccountAdditionSource";
// static // static
void InlineLoginDialogChromeOS::Show(const std::string& email, void InlineLoginDialogChromeOS::ShowDeprecated(const std::string& email,
const Source& source) { const Source& source) {
base::UmaHistogramEnumeration(kAccountAdditionSource, source); base::UmaHistogramEnumeration(kAccountAdditionSource, source);
// If the dialog was triggered as a response to background request, it could // If the dialog was triggered as a response to background request, it could
// get displayed on the lock screen. In this case it is safe to ignore it, // get displayed on the lock screen. In this case it is safe to ignore it,
...@@ -124,8 +124,8 @@ void InlineLoginDialogChromeOS::Show(const std::string& email, ...@@ -124,8 +124,8 @@ void InlineLoginDialogChromeOS::Show(const std::string& email,
->SetBackdropType(ash::WindowBackdrop::BackdropType::kSemiOpaque); ->SetBackdropType(ash::WindowBackdrop::BackdropType::kSemiOpaque);
} }
void InlineLoginDialogChromeOS::Show(const Source& source) { void InlineLoginDialogChromeOS::ShowDeprecated(const Source& source) {
Show(/* email= */ std::string(), source); ShowDeprecated(/* email= */ std::string(), source);
} }
// static // static
......
...@@ -69,11 +69,15 @@ class InlineLoginDialogChromeOS : public SystemWebDialogDelegate, ...@@ -69,11 +69,15 @@ class InlineLoginDialogChromeOS : public SystemWebDialogDelegate,
// Displays the dialog. |email| pre-fills the account email field in the // Displays the dialog. |email| pre-fills the account email field in the
// sign-in dialog - useful for account re-authentication. |source| specifies // sign-in dialog - useful for account re-authentication. |source| specifies
// the source UX surface used for launching the dialog. // 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 // Displays the dialog for account addition. |source| specifies the source UX
// surface used for launching the dialog. // 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 // 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. // 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