0

[CodeHealth] Clean up NewLockScreenReauthLayout flag.

Bug: 356235036
Change-Id: Ife05c8b891feb66a78788637d35c3dac67e21e23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6106860
Commit-Queue: Daseul Lee <dslee@chromium.org>
Reviewed-by: Michael Slutskii <slutskii@google.com>
Cr-Commit-Position: refs/heads/main@{#1407306}
This commit is contained in:
Daseul Lee
2025-01-16 07:10:54 -08:00
committed by Chromium LUCI CQ
parent 982c348e6c
commit bc7928712d
9 changed files with 11 additions and 47 deletions

@ -1874,11 +1874,6 @@ BASE_FEATURE(kNotifierCollision,
// Enables a bugfix for devices with a null custom top row property.
BASE_FEATURE(kNullTopRowFix, "NullTopRowFix", base::FEATURE_ENABLED_BY_DEFAULT);
// Controls whether new Lockscreen reauth layout is shown or not.
BASE_FEATURE(kNewLockScreenReauthLayout,
"NewLockScreenReauthLayout",
base::FEATURE_ENABLED_BY_DEFAULT);
// Feature Management flag for the Sys UI holdback experiment, used to avoid
// certain devices.
BASE_FEATURE(kFeatureManagementShouldExcludeFromSysUiHoldback,
@ -4020,10 +4015,6 @@ bool IsOAuthIppEnabled() {
return base::FeatureList::IsEnabled(kEnableOAuthIpp);
}
bool IsNewLockScreenReauthLayoutEnabled() {
return base::FeatureList::IsEnabled(kNewLockScreenReauthLayout);
}
bool IsNotificationCenterControllerEnabled() {
return base::FeatureList::IsEnabled(kNotificationCenterController) ||
// Ongoing processes must launch together with the new

@ -613,8 +613,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kNotificationLimit);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kNotifierCollision);
COMPONENT_EXPORT(ASH_CONSTANTS) BASE_DECLARE_FEATURE(kNullTopRowFix);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kNewLockScreenReauthLayout);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kFeatureManagementShouldExcludeFromSysUiHoldback);
COMPONENT_EXPORT(ASH_CONSTANTS)
BASE_DECLARE_FEATURE(kSysUiShouldHoldbackDriveIntegration);
@ -1223,7 +1221,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNearbyPresenceEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNotificationLimitEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNotifierCollisionEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsEnrollmentNudgingForTestingEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNewLockScreenReauthLayoutEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNotificationCenterControllerEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS) bool IsNotificationExpansionAnimationEnabled();
COMPONENT_EXPORT(ASH_CONSTANTS)

@ -24,8 +24,6 @@ gfx::Size FitSizeToDisplay(const gfx::Size& desired) {
} // namespace
constexpr gfx::Size BaseLockDialog::kBaseLockDialogSize;
BaseLockDialog::BaseLockDialog(const GURL& url, const gfx::Size& desired_size)
: SystemWebDialogDelegate(url, /*title=*/std::u16string()),
desired_size_(desired_size) {}

@ -23,8 +23,6 @@ class BaseLockDialog : public SystemWebDialogDelegate {
void AdjustWidgetInitParams(views::Widget::InitParams* params) override;
ui::mojom::ModalType GetDialogModalType() const override;
static constexpr gfx::Size kBaseLockDialogSize = gfx::Size(768, 640);
private:
gfx::Size desired_size_;
};

@ -4,19 +4,19 @@
#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_captive_portal_dialog.h"
#include "ash/constants/ash_features.h"
#include "chrome/browser/ash/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_reauth_dialogs.h"
#include "chrome/browser/ui/ash/login/oobe_dialog_size_utils.h"
#include "chromeos/ash/components/network/network_connection_handler.h"
#include "chromeos/ash/components/network/network_handler.h"
#include "chromeos/ash/components/network/network_state_handler.h"
#include "components/captive_portal/core/captive_portal_detector.h"
namespace ash {
LockScreenCaptivePortalDialog::LockScreenCaptivePortalDialog()
: BaseLockDialog(
GURL(captive_portal::CaptivePortalDetector::kDefaultURL),
LockScreenStartReauthDialog::CalculateLockScreenReauthDialogSize(
features::IsNewLockScreenReauthLayoutEnabled())) {}
: BaseLockDialog(GURL(captive_portal::CaptivePortalDetector::kDefaultURL),
CalculateOobeDialogSizeForPrimaryDisplay()) {}
LockScreenCaptivePortalDialog::~LockScreenCaptivePortalDialog() = default;

@ -6,12 +6,11 @@
#include <memory>
#include "ash/constants/ash_features.h"
#include "base/functional/bind.h"
#include "base/task/task_traits.h"
#include "chrome/browser/ash/profiles/profile_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/ash/lock_screen_reauth/lock_screen_reauth_dialogs.h"
#include "chrome/browser/ui/ash/login/oobe_dialog_size_utils.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "chrome/grit/generated_resources.h"
@ -24,10 +23,8 @@ namespace ash {
LockScreenNetworkDialog::LockScreenNetworkDialog(
NetworkDialogCleanupCallback callback)
: BaseLockDialog(
GURL(chrome::kChromeUILockScreenNetworkURL),
LockScreenStartReauthDialog::CalculateLockScreenReauthDialogSize(
features::IsNewLockScreenReauthLayoutEnabled())) {
: BaseLockDialog(GURL(chrome::kChromeUILockScreenNetworkURL),
CalculateOobeDialogSizeForPrimaryDisplay()) {
callback_ = std::move(callback);
}

@ -7,7 +7,6 @@
#include <memory>
#include <string>
#include "ash/constants/ash_features.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
@ -94,17 +93,6 @@ class LockScreenStartReauthDialog::ModalDialogManagerCleanup
}
};
// static
gfx::Size LockScreenStartReauthDialog::CalculateLockScreenReauthDialogSize(
bool is_new_layout_enabled) {
if (!is_new_layout_enabled) {
return kBaseLockDialogSize;
}
// LockscreenReauth Dialog size should match OOBE Dialog size.
return CalculateOobeDialogSizeForPrimaryDisplay();
}
void LockScreenStartReauthDialog::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
@ -284,8 +272,7 @@ void LockScreenStartReauthDialog::OnCaptivePortalDialogReadyForTesting() {
LockScreenStartReauthDialog::LockScreenStartReauthDialog()
: BaseLockDialog(GURL(chrome::kChromeUILockScreenStartReauthURL),
CalculateLockScreenReauthDialogSize(
features::IsNewLockScreenReauthLayoutEnabled())),
CalculateOobeDialogSizeForPrimaryDisplay()),
network_state_informer_(base::MakeRefCounted<NetworkStateInformer>()) {
network_state_informer_->Init();
scoped_observation_.Observe(network_state_informer_.get());

@ -58,8 +58,6 @@ class LockScreenStartReauthDialog
void DismissLockScreenCaptivePortalDialog();
void ShowLockScreenNetworkDialog();
void ShowLockScreenCaptivePortalDialog();
static gfx::Size CalculateLockScreenReauthDialogSize(
bool is_new_layout_enabled);
// Forces network state update because webview reported frame loading error.
void OnWebviewLoadAborted();

@ -284,9 +284,7 @@ void LockScreenReauthHandler::OnSetCookieForLoadGaiaWithPartition(
// TODO(crbug.com/377862442) Add autoreload url param.
CallJavascript("loadAuthenticator", params);
if (features::IsNewLockScreenReauthLayoutEnabled()) {
UpdateOrientationAndWidth();
}
UpdateOrientationAndWidth();
}
void LockScreenReauthHandler::UpdateOrientationAndWidth() {