Report native messaging connection errors back to the native app.
When a native application attempts to initiate a native messaging connection with a cooperating extension, that extension may not be installed; in this case, the native app should be informed by launching its native messaging host to notify it of this error. This is also needed if the native app provides invalid input when requesting this communication channel. Add NativeMessagingHostErrorReporter, a self-owning class responsible for starting the native messaging host with flag specific to the error and keeping Chrome alive until either the native messaging host terminates (upon informing the original native app of the error), or a 10 second timeout to avoid Chrome getting stuck due to a misbehaving native messaging host. Add plumbing to the existing native messaging host launch code to handle the additional parameter. Bug: 967262 Change-Id: Ie68cbae094de226fa43244719abda434d6200590 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1675587Reviewed-by:Ben Wells <benwells@chromium.org> Reviewed-by:
Sergey Ulanov <sergeyu@chromium.org> Commit-Queue: Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#712836}
Showing
This diff is collapsed.
Please register or sign in to comment