Commit 098ad038 authored by nancy's avatar nancy Committed by Commit Bot

Add back the ShowInSearch checking.

In CL:1847698, the ShowInSearchChecking is removed because the
recommendable Internal/Built-in apps should be involved in the search
result. However, it causes the issue that more apps are list in search
result for the guest user.

Actually, only the two suggested apps should be search out for the
recommend searching result, other apps, if should not shown in search,
should still be filled out. So the ShowInSearch checking is added back
and add !IsSuggestionChip(update.AppId()) checking.


BUG=1017631

Change-Id: I1397e11ba5b8162e0d2986705b990fb054855c3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1880493Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709502}
parent 00ae58a8
......@@ -279,8 +279,12 @@ class AppServiceDataSource : public AppSearchProvider::DataSource,
}
proxy->AppRegistryCache().ForEachApp([this, apps_vector](
const apps::AppUpdate& update) {
if (update.Readiness() == apps::mojom::Readiness::kUninstalledByUser)
if ((update.Readiness() == apps::mojom::Readiness::kUninstalledByUser) ||
(update.ShowInSearch() != apps::mojom::OptionalBool::kTrue &&
!(update.Recommendable() == apps::mojom::OptionalBool::kTrue &&
update.AppType() == apps::mojom::AppType::kBuiltIn))) {
return;
}
if (!std::strcmp(update.AppId().c_str(),
ash::kInternalAppIdContinueReading)) {
......
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