Commit 366731bb authored by Timothy Loh's avatar Timothy Loh Committed by Commit Bot

Fix pinned Crostini apps disappearing on restore

This patch fixes LauncherControllerHelper::IsValidIDForCurrentUser to
handle Crostini apps, so that the restore process can correctly add
pinned Crostini apps.

TEST=Manually verified both the Terminal and installed Crostini apps
re-appear after reboot.

Bug: 839141
Change-Id: I09a40a9f24779b19a2b1bae1c21f9a33e0ae1708
Reviewed-on: https://chromium-review.googlesource.com/1043665Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555999}
parent c4b0f83e
...@@ -170,6 +170,11 @@ bool LauncherControllerHelper::IsValidIDForCurrentUser( ...@@ -170,6 +170,11 @@ bool LauncherControllerHelper::IsValidIDForCurrentUser(
if (arc_prefs && arc_prefs->IsRegistered(id)) if (arc_prefs && arc_prefs->IsRegistered(id))
return true; return true;
crostini::CrostiniRegistryService* registry_service =
crostini::CrostiniRegistryServiceFactory::GetForProfile(profile_);
if (registry_service && registry_service->IsCrostiniShelfAppId(id))
return registry_service->GetRegistration(id) != nullptr;
if (app_list::IsInternalApp(id)) if (app_list::IsInternalApp(id))
return true; return true;
......
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