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( ...@@ -44,10 +44,6 @@ std::unique_ptr<AuthenticatorRequestSheetView> CreateSheetViewForCurrentStepOf(
std::unique_ptr<AuthenticatorRequestSheetView> sheet_view; std::unique_ptr<AuthenticatorRequestSheetView> sheet_view;
switch (dialog_model->current_step()) { switch (dialog_model->current_step()) {
case Step::kWelcomeScreen:
sheet_view = std::make_unique<AuthenticatorRequestSheetView>(
std::make_unique<AuthenticatorWelcomeSheetModel>(dialog_model));
break;
case Step::kTransportSelection: case Step::kTransportSelection:
sheet_view = std::make_unique<AuthenticatorTransportSelectorSheetView>( sheet_view = std::make_unique<AuthenticatorTransportSelectorSheetView>(
std::make_unique<AuthenticatorTransportSelectorSheetModel>( std::make_unique<AuthenticatorTransportSelectorSheetModel>(
......
...@@ -122,40 +122,6 @@ void AuthenticatorSheetModelBase::OnModelDestroyed() { ...@@ -122,40 +122,6 @@ void AuthenticatorSheetModelBase::OnModelDestroyed() {
dialog_model_ = nullptr; 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 ----------------------------------- // AuthenticatorTransportSelectorSheetModel -----------------------------------
bool AuthenticatorTransportSelectorSheetModel::IsBackButtonVisible() const { bool AuthenticatorTransportSelectorSheetModel::IsBackButtonVisible() const {
......
...@@ -60,23 +60,6 @@ class AuthenticatorSheetModelBase ...@@ -60,23 +60,6 @@ class AuthenticatorSheetModelBase
DISALLOW_COPY_AND_ASSIGN(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 // The sheet shown for selecting the transport over which the security key
// should be accessed. // should be accessed.
class AuthenticatorTransportSelectorSheetModel class AuthenticatorTransportSelectorSheetModel
......
...@@ -141,8 +141,7 @@ void AuthenticatorRequestDialogModel::StartOver() { ...@@ -141,8 +141,7 @@ void AuthenticatorRequestDialogModel::StartOver() {
void AuthenticatorRequestDialogModel:: void AuthenticatorRequestDialogModel::
StartGuidedFlowForMostLikelyTransportOrShowTransportSelection() { StartGuidedFlowForMostLikelyTransportOrShowTransportSelection() {
DCHECK(current_step() == Step::kWelcomeScreen || DCHECK(current_step() == Step::kNotStarted);
current_step() == Step::kNotStarted);
// If no authenticator other than the one for the native Windows API is // 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 // available, don't show Chrome UI but proceed straight to the native
...@@ -175,7 +174,6 @@ void AuthenticatorRequestDialogModel::StartGuidedFlowForTransport( ...@@ -175,7 +174,6 @@ void AuthenticatorRequestDialogModel::StartGuidedFlowForTransport(
AuthenticatorTransport transport, AuthenticatorTransport transport,
bool pair_with_new_device_for_bluetooth_low_energy) { bool pair_with_new_device_for_bluetooth_low_energy) {
DCHECK(current_step() == Step::kTransportSelection || DCHECK(current_step() == Step::kTransportSelection ||
current_step() == Step::kWelcomeScreen ||
current_step() == Step::kUsbInsertAndActivate || current_step() == Step::kUsbInsertAndActivate ||
current_step() == Step::kBleActivate || current_step() == Step::kBleActivate ||
current_step() == Step::kCableActivate || current_step() == Step::kCableActivate ||
...@@ -234,7 +232,6 @@ void AuthenticatorRequestDialogModel:: ...@@ -234,7 +232,6 @@ void AuthenticatorRequestDialogModel::
void AuthenticatorRequestDialogModel:: void AuthenticatorRequestDialogModel::
EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step next_step) { EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step next_step) {
DCHECK(current_step() == Step::kTransportSelection || DCHECK(current_step() == Step::kTransportSelection ||
current_step() == Step::kWelcomeScreen ||
current_step() == Step::kUsbInsertAndActivate || current_step() == Step::kUsbInsertAndActivate ||
current_step() == Step::kBleActivate || current_step() == Step::kBleActivate ||
current_step() == Step::kCableActivate || current_step() == Step::kCableActivate ||
......
...@@ -48,7 +48,6 @@ class AuthenticatorRequestDialogModel { ...@@ -48,7 +48,6 @@ class AuthenticatorRequestDialogModel {
// The UX flow has not started yet, the dialog should still be hidden. // The UX flow has not started yet, the dialog should still be hidden.
kNotStarted, kNotStarted,
kWelcomeScreen,
kTransportSelection, kTransportSelection,
// The request errored out before completing. Error will only be sent // The request errored out before completing. Error will only be sent
...@@ -176,8 +175,8 @@ class AuthenticatorRequestDialogModel { ...@@ -176,8 +175,8 @@ class AuthenticatorRequestDialogModel {
return ephemeral_state_.selected_authenticator_id_; return ephemeral_state_.selected_authenticator_id_;
} }
// Starts the UX flow, by either showing the welcome screen, the transport // Starts the UX flow, by either showing the transport selection screen or
// selection screen, or the guided flow for them most likely transport. // the guided flow for them most likely transport.
// //
// Valid action when at step: kNotStarted. // Valid action when at step: kNotStarted.
void StartFlow( void StartFlow(
...@@ -193,13 +192,13 @@ class AuthenticatorRequestDialogModel { ...@@ -193,13 +192,13 @@ class AuthenticatorRequestDialogModel {
// transport selection screen if the transport could not be uniquely // transport selection screen if the transport could not be uniquely
// identified. // identified.
// //
// Valid action when at step: kNotStarted, kWelcomeScreen. // Valid action when at step: kNotStarted.
void StartGuidedFlowForMostLikelyTransportOrShowTransportSelection(); void StartGuidedFlowForMostLikelyTransportOrShowTransportSelection();
// Requests that the step-by-step wizard flow commence, guiding the user // Requests that the step-by-step wizard flow commence, guiding the user
// through using the Secutity Key with the given |transport|. // 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, // kTransportSelection, and steps where the other transports menu is shown,
// namely, kUsbInsertAndActivate, kBleActivate, kCableActivate. // namely, kUsbInsertAndActivate, kBleActivate, kCableActivate.
void StartGuidedFlowForTransport( void StartGuidedFlowForTransport(
...@@ -216,9 +215,9 @@ class AuthenticatorRequestDialogModel { ...@@ -216,9 +215,9 @@ class AuthenticatorRequestDialogModel {
// then advanced to the flow to turn on Bluetooth automatically. // then advanced to the flow to turn on Bluetooth automatically.
// -- Otherwise advanced to the manual Bluetooth power on flow. // -- Otherwise advanced to the manual Bluetooth power on flow.
// //
// Valid action when at step: kNotStarted, kWelcomeScreen, // Valid action when at step: kNotStarted, kTransportSelection, and steps
// kTransportSelection, and steps where the other transports menu is shown, // where the other transports menu is shown, namely, kUsbInsertAndActivate,
// namely, kUsbInsertAndActivate, kBleActivate, kCableActivate. // kBleActivate, kCableActivate.
void EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step step); void EnsureBleAdapterIsPoweredBeforeContinuingWithStep(Step step);
// Continues with the BLE/caBLE flow now that the Bluetooth adapter is // 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