Commit 3818db90 authored by nancy's avatar nancy Committed by Commit Bot

Remove apps from pause_apps when uninstall.

When the app is installed, Family Link should notify AppService to
pause or unpause the app. The default status is unpaused, so when
uninstall the app, it should be removed from paused_apps list as the
unpaused status.

BUG=1011235

Change-Id: I51caf197f9e4f24665d608cd04f4457d0fb29ef3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1914004Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715078}
parent e11e9eba
...@@ -545,6 +545,8 @@ void ArcApps::OnAppStatesChanged(const std::string& app_id, ...@@ -545,6 +545,8 @@ void ArcApps::OnAppStatesChanged(const std::string& app_id,
} }
void ArcApps::OnAppRemoved(const std::string& app_id) { void ArcApps::OnAppRemoved(const std::string& app_id) {
paused_apps.erase(app_id);
apps::mojom::AppPtr app = apps::mojom::App::New(); apps::mojom::AppPtr app = apps::mojom::App::New();
app->app_type = apps::mojom::AppType::kArc; app->app_type = apps::mojom::AppType::kArc;
app->app_id = app_id; app->app_id = app_id;
......
...@@ -718,6 +718,7 @@ void ExtensionApps::OnExtensionUninstalled( ...@@ -718,6 +718,7 @@ void ExtensionApps::OnExtensionUninstalled(
} }
enable_flow_map_.erase(extension->id()); enable_flow_map_.erase(extension->id());
paused_apps.erase(extension->id());
// Construct an App with only the information required to identify an // Construct an App with only the information required to identify an
// uninstallation. // uninstallation.
......
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