Commit 88a342c1 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Commander: strip ampersands from SimpleCommandSource constants

Command string constants often have ampersands embedded in them for
display in Windows menus. These need to be stripped out for display in
commander.

Bug: 1014639
Change-Id: I37e87013fd0eb4a18eb796b8870768c9794c1aa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440308Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812817}
parent 5a9728c4
......@@ -42,8 +42,9 @@ CommandSource::CommandResults SimpleCommandSource::GetCommands(
for (const auto& command_spec : command_map) {
if (!chrome::IsCommandEnabled(browser, command_spec.command_id))
continue;
const base::string16 title =
base::string16 title =
l10n_util::GetStringUTF16(command_spec.string_constant);
base::Erase(title, '&');
double score = FuzzyFind(folded_input, title, &ranges);
if (score == 0)
continue;
......
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