Skip to content

Commit 464dda1

Browse files
alancutterChromium LUCI CQ
authored andcommitted
Fix small logic error in AppBannerManagerAndroid::GetName()
This ternery expression got flipped in: https://chromium-review.googlesource.com/c/chromium/src/+/3060401/23/components/webapps/browser/android/app_banner_manager_android.cc#468 As a result sites that specify a short_name in their mainfest have empty string app name. This CL restores the logic back to what it was. Bug: 1238735 Change-Id: I7c5aa4950ca99a8fe9cc9ac8b615702eb66dd46a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3089985 Reviewed-by: Glenn Hartmann <[email protected]> Commit-Queue: Alan Cutter <[email protected]> Cr-Commit-Position: refs/heads/master@{#911599}
1 parent f209817 commit 464dda1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/webapps/browser/android/app_banner_manager_android.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ std::u16string AppBannerManagerAndroid::GetAppName() const {
467467
// Prefer the short name if it's available. It's guaranteed that at least
468468
// one of these is non-empty.
469469
std::u16string short_name = manifest().short_name.value_or(u"");
470-
return short_name.empty() ? manifest().name.value_or(u"") : u"";
470+
return short_name.empty() ? manifest().name.value_or(u"") : short_name;
471471
}
472472

473473
return native_app_title_;

0 commit comments

Comments
 (0)