Commit f096a8f4 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS Settings] Remove invalid DCHECK() to prevent crash.

The DCHECK() verified that we only bound the UserActionRecorder once
during the lifetime of the OsSettingsUi class. However, I had not
realized that refreshing the settings page reuses the same underlying
OsSettingsUi object, so the BindInterface() function is actually
expected to be called once per load of the page (regardless of initial
load or refresh).

Fixed: 1055001
Change-Id: I4d22ec27a5279483d795de18c4f591f83984bf2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085532
Auto-Submit: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746507}
parent 05daf314
......@@ -446,8 +446,6 @@ void OSSettingsUI::BindInterface(
void OSSettingsUI::BindInterface(
mojo::PendingReceiver<mojom::UserActionRecorder> receiver) {
DCHECK(!user_action_recorder_)
<< "Should only be bound once per settings session.";
user_action_recorder_ =
std::make_unique<SettingsUserActionTracker>(std::move(receiver));
}
......
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