Special-case for determining the app_id of crostini apps.

Due to the way that the crostini terminal works, the shelf_id was being
overwritten because it was:
 - On a technicality being "DidFinishNavigation"'d when it loads.
 - Assumed to be a browser window (because we run crosh in a window)
 - Failed to be associated with an extension (because crostini isn't)
 - Failed to be associated with an app app_id
 - Therefore: defaulted to the browser's shelf id.

This fix catches the special case for crostini apps, which is to set
the app_name of the browser on creation. We also propose a unit test
to maintain this behaviour. Note that all of these measures are
temporary, pending a better implementation of the crostini terminal.

Bug: 839676
Change-Id: I46a43960cbc3820968fbb9872c142923d753039e
Reviewed-on: https://chromium-review.googlesource.com/c/1491876
Reviewed-by: Fergus Dall <sidereal@google.com>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Nic Hollingum <hollingum@google.com>
Cr-Commit-Position: refs/heads/master@{#636684}
2 files changed