Skip to content

Commit

Permalink
[CodeHealth] Remove stale base::Feature NonInteractiveTimeoutForWebAu…
Browse files Browse the repository at this point in the history
…thFlow

Enabled by default since M113.

Bug: 356235252
Change-Id: Ibdf5803abb34bdc4888b4b05bddf89038a200603
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5999912
Reviewed-by: Alexander Bolodurin <[email protected]>
Code-Coverage: [email protected] <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Commit-Queue: Alexander Bolodurin <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1380061}
  • Loading branch information
mstensho authored and Chromium LUCI CQ committed Nov 8, 2024
1 parent fba0f8b commit 46c2402
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ void RecordHistogramFunctionResult(

} // namespace

BASE_FEATURE(kNonInteractiveTimeoutForWebAuthFlow,
"NonInteractiveTimeoutForWebAuthFlow",
base::FEATURE_ENABLED_BY_DEFAULT);

IdentityLaunchWebAuthFlowFunction::IdentityLaunchWebAuthFlowFunction() {
#if BUILDFLAG(IS_CHROMEOS)
delegate_ = std::make_unique<LaunchWebAuthFlowDelegateAsh>();
Expand Down Expand Up @@ -122,18 +118,15 @@ ExtensionFunction::ResponseAction IdentityLaunchWebAuthFlowFunction::Run() {
? WebAuthFlow::INTERACTIVE
: WebAuthFlow::SILENT;

auto abort_on_load_for_non_interactive = WebAuthFlow::AbortOnLoad::kYes;
std::optional<base::TimeDelta> timeout_for_non_interactive = std::nullopt;
if (base::FeatureList::IsEnabled(kNonInteractiveTimeoutForWebAuthFlow)) {
abort_on_load_for_non_interactive =
params->details.abort_on_load_for_non_interactive.value_or(true)
? WebAuthFlow::AbortOnLoad::kYes
: WebAuthFlow::AbortOnLoad::kNo;
if (params->details.timeout_ms_for_non_interactive) {
timeout_for_non_interactive = std::clamp(
base::Milliseconds(*params->details.timeout_ms_for_non_interactive),
base::TimeDelta(), WebAuthFlow::kNonInteractiveMaxTimeout);
}
std::optional<base::TimeDelta> timeout_for_non_interactive;
auto abort_on_load_for_non_interactive =
params->details.abort_on_load_for_non_interactive.value_or(true)
? WebAuthFlow::AbortOnLoad::kYes
: WebAuthFlow::AbortOnLoad::kNo;
if (params->details.timeout_ms_for_non_interactive) {
timeout_for_non_interactive = std::clamp(
base::Milliseconds(*params->details.timeout_ms_for_non_interactive),
base::TimeDelta(), WebAuthFlow::kNonInteractiveMaxTimeout);
}

// Set up acceptable target URLs. (Does not include chrome-extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@

namespace extensions {

// When enabled, abortOnLoadForNonInteractive and timeoutMsForNonInteractive
// arguments to launchWebAuthFlow will be used to allow the loaded auth page to
// wait before failing with an 'interaction required' error. This allows JS to
// run and redirects to happen after page load.
BASE_DECLARE_FEATURE(kNonInteractiveTimeoutForWebAuthFlow);

class IdentityLaunchWebAuthFlowFunction : public ExtensionFunction,
public WebAuthFlow::Delegate {
public:
Expand Down

0 comments on commit 46c2402

Please sign in to comment.