Commit 4ede6565 authored by Alexey Baskakov's avatar Alexey Baskakov Committed by Commit Bot

WebApp: Fix for proper removal of the web app icon on web app uninstalled.

Observe OnWebAppWillBeUninstalled instead of OnWebAppUninstalled.

It's too late to obtain the app pointer from the registrar after a web app
uninstall (deletion) happened.

Bug: 1029221
Change-Id: I7794ed4fa7ed52ac396949eed88bd4514ed2154a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975473Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726599}
parent e0d7d614
......@@ -404,7 +404,7 @@ void WebApps::OnWebAppInstalled(const web_app::AppId& app_id) {
}
}
void WebApps::OnWebAppUninstalled(const web_app::AppId& app_id) {
void WebApps::OnWebAppWillBeUninstalled(const web_app::AppId& app_id) {
const web_app::WebApp* web_app = GetWebApp(app_id);
if (!web_app) {
return;
......
......@@ -96,7 +96,7 @@ class WebApps : public apps::mojom::Publisher,
// web_app::AppRegistrarObserver:
void OnWebAppInstalled(const web_app::AppId& app_id) override;
void OnWebAppUninstalled(const web_app::AppId& app_id) override;
void OnWebAppWillBeUninstalled(const web_app::AppId& app_id) override;
void OnAppRegistrarDestroyed() override;
// TODO(loyso): Implement app->last_launch_time field for the new system.
......
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