Commit ff0f1ca1 authored by Jeevan Shikaram's avatar Jeevan Shikaram Committed by Commit Bot

[App Management] Ignore app changes if the app is not in App Management.

App Serice updates are issued as delta of changes. This means that every
app update will not have the ShowInManagement field. This causes every
app update to be sent to the App Management front end. This CL ignores
any app updates to apps that are not already in App Management. Adding
new apps is unaffected.

Bug: 1002233
Change-Id: Ie2d674238a2d43d167c54f45c78bdb9060a770e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807650Reviewed-by: default avatarAlan Cutter <alancutter@chromium.org>
Commit-Queue: Jeevan Shikaram <jshikaram@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697426}
parent e6887237
......@@ -31,7 +31,11 @@ cr.define('app_management', function() {
* @return {AppMap}
*/
AppState.changeApp = function(apps, action) {
assert(apps[action.app.id]);
// If the app doesn't exist, that means that the app that has been changed
// does not need to be shown in App Management.
if (!apps[action.app.id]) {
return apps;
}
const changedAppEntry = {};
changedAppEntry[action.app.id] = action.app;
......
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