Commit 55f57928 authored by Nina Satragno's avatar Nina Satragno Committed by Commit Bot

[webauthn] Remove Welcome Screen

The welcome screen is no longer used. Slay the zombie code.

Bug: 1002590
Change-Id: I0ef7c5e6df668ee3fa383b466ff90fe7c85401cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797803
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#695687}
parent 2d792165
......@@ -44,10 +44,6 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf(
std::unique_ptr<AuthenticatorRequestSheetView> sheet_view;
switch (dialog_model->current_step()) {
case Step::kWelcomeScreen:
sheet_view = std::make_unique<AuthenticatorRequestSheetView>(
std::make_unique<AuthenticatorWelcomeSheetModel>(dialog_model));
break;
case Step::kTransportSelection:
sheet_view = std::make_unique<AuthenticatorTransportSelectorSheetView>(
std::make_unique<AuthenticatorTransportSelectorSheetModel>(
......
......@@ -122,40 +122,6 @@ void AuthenticatorSheetModelBase::OnModelDestroyed() {
dialog_model_ = nullptr;
}
// AuthenticatorWelcomeSheetModel ---------------------------------------------
const gfx::VectorIcon& AuthenticatorWelcomeSheetModel::GetStepIllustration(
ImageColorScheme color_scheme) const {
return color_scheme == ImageColorScheme::kDark ? kWebauthnWelcomeDarkIcon
: kWebauthnWelcomeIcon;
}
base::string16 AuthenticatorWelcomeSheetModel::GetStepTitle() const {
return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_TITLE,
GetRelyingPartyIdString(dialog_model()));
}
base::string16 AuthenticatorWelcomeSheetModel::GetStepDescription() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_DESCRIPTION);
}
bool AuthenticatorWelcomeSheetModel::IsAcceptButtonVisible() const {
return true;
}
bool AuthenticatorWelcomeSheetModel::IsAcceptButtonEnabled() const {
return true;
}
base::string16 AuthenticatorWelcomeSheetModel::GetAcceptButtonLabel() const {
return l10n_util::GetStringUTF16(IDS_WEBAUTHN_WELCOME_SCREEN_NEXT);
}
void AuthenticatorWelcomeSheetModel::OnAccept() {
dialog_model()
->StartGuidedFlowForMostLikelyTransportOrShowTransportSelection();
}
// AuthenticatorTransportSelectorSheetModel -----------------------------------
bool AuthenticatorTransportSelectorSheetModel::IsBackButtonVisible() const {
......
......@@ -60,23 +60,6 @@ class AuthenticatorSheetModelBase
DISALLOW_COPY_AND_ASSIGN(AuthenticatorSheetModelBase);
};
// The initial sheet shown when the UX flow starts.
class AuthenticatorWelcomeSheetModel : public AuthenticatorSheetModelBase {
public:
using AuthenticatorSheetModelBase::AuthenticatorSheetModelBase;
private:
// AuthenticatorSheetModelBase:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
base::string16 GetStepTitle() const override;
base::string16 GetStepDescription() const override;
bool IsAcceptButtonVisible() const override;
bool IsAcceptButtonEnabled() const override;
base::string16 GetAcceptButtonLabel() const override;
void OnAccept() override;
};
// The sheet shown for selecting the transport over which the security key
// should be accessed.
class AuthenticatorTransportSelectorSheetModel
......
......@@ -141,8 +141,7 @@ void AuthenticatorRequestDialogModel::StartOver() {
void AuthenticatorRequestDialogModel::
StartGuidedFlowForMostLikelyTransportOrShowTransportSelection() {
DCHECK(current_step() == Step::kWelcomeScreen ||
current_step() == Step::kNotStarted);
DCHECK(current_step() == Step::kNotStarted);
// If no authenticator other than the one for the native Windows API is
// available, don't show Chrome UI but proceed straight to the native
......@@ -175,7 +174,6 @@ void AuthenticatorRequestDialogModel::StartGuidedFlowForTransport(
AuthenticatorTransport transport,
bool pair_with_new_device_for_bluetooth_low_energy) {
DCHECK(current_step() == Step::kTransportSelection ||
current_step() == Step::kWelcomeScreen ||
current_step() == Step::kUsbInsertAndActivate ||
current_step() == Step::kBleActivate ||
current_step() == Step::kCableActivate ||
......@@ -234,7 +232,6 @@ void AuthenticatorRequestDialogModel::
void AuthenticatorRequestDialogModel::
EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step next_step) {
DCHECK(current_step() == Step::kTransportSelection ||
current_step() == Step::kWelcomeScreen ||
current_step() == Step::kUsbInsertAndActivate ||
current_step() == Step::kBleActivate ||
current_step() == Step::kCableActivate ||
......
......@@ -48,7 +48,6 @@ class AuthenticatorRequestDialogModel {
// The UX flow has not started yet, the dialog should still be hidden.
kNotStarted,
kWelcomeScreen,
kTransportSelection,
// The request errored out before completing. Error will only be sent
......@@ -176,8 +175,8 @@ class AuthenticatorRequestDialogModel {
return ephemeral_state_.selected_authenticator_id_;
}
// Starts the UX flow, by either showing the welcome screen, the transport
// selection screen, or the guided flow for them most likely transport.
// Starts the UX flow, by either showing the transport selection screen or
// the guided flow for them most likely transport.
//
// Valid action when at step: kNotStarted.
void StartFlow(
......@@ -193,13 +192,13 @@ class AuthenticatorRequestDialogModel {
// transport selection screen if the transport could not be uniquely
// identified.
//
// Valid action when at step: kNotStarted, kWelcomeScreen.
// Valid action when at step: kNotStarted.
void StartGuidedFlowForMostLikelyTransportOrShowTransportSelection();
// Requests that the step-by-step wizard flow commence, guiding the user
// through using the Secutity Key with the given |transport|.
//
// Valid action when at step: kNotStarted, kWelcomeScreen,
// Valid action when at step: kNotStarted.
// kTransportSelection, and steps where the other transports menu is shown,
// namely, kUsbInsertAndActivate, kBleActivate, kCableActivate.
void StartGuidedFlowForTransport(
......@@ -216,9 +215,9 @@ class AuthenticatorRequestDialogModel {
// then advanced to the flow to turn on Bluetooth automatically.
// -- Otherwise advanced to the manual Bluetooth power on flow.
//
// Valid action when at step: kNotStarted, kWelcomeScreen,
// kTransportSelection, and steps where the other transports menu is shown,
// namely, kUsbInsertAndActivate, kBleActivate, kCableActivate.
// Valid action when at step: kNotStarted, kTransportSelection, and steps
// where the other transports menu is shown, namely, kUsbInsertAndActivate,
// kBleActivate, kCableActivate.
void EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step step);
// Continues with the BLE/caBLE flow now that the Bluetooth adapter is
......
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