Skip to content

Commit

Permalink
Migrate FindBarView to AXNodeData::SetNameChecked
Browse files Browse the repository at this point in the history
AXNodeData::SetName was marked as deprecated in favor of SetNameChecked
which includes DCHECKs for things expected to be true. This commit
migrates FindBarView from SetName to SetNameChecked.

AX-Relnotes: n/a

Bug: 1348081
Change-Id: I2be4ade7146a59195b5721c0da99afaeba8f6110
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3907929
Commit-Queue: Joanmarie Diggs <jdiggs@igalia.com>
Reviewed-by: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053225}
  • Loading branch information
joanmarie authored and Chromium LUCI CQ committed Sep 29, 2022
1 parent 8973181 commit cd15911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/ui/views/find_bar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ class FindBarMatchCountLabel : public views::Label {
if (!last_result_) {
node_data->SetNameExplicitlyEmpty();
} else if (last_result_->number_of_matches() < 1) {
node_data->SetName(
node_data->SetNameChecked(
l10n_util::GetStringUTF16(IDS_ACCESSIBLE_FIND_IN_PAGE_NO_RESULTS));
} else {
node_data->SetName(l10n_util::GetStringFUTF16(
node_data->SetNameChecked(l10n_util::GetStringFUTF16(
IDS_ACCESSIBLE_FIND_IN_PAGE_COUNT,
base::FormatNumber(last_result_->active_match_ordinal()),
base::FormatNumber(last_result_->number_of_matches())));
Expand Down

0 comments on commit cd15911

Please sign in to comment.