[Extensions] Fix ExternalInstallManager crash
A crash could occur in ExternalInstallManager if an extension was unacknowledged (and thus in ExternalInstallManager::unacknowledged_ids_), had reached the maximum number of prompts (3), and hadn't had an error shown for it during the session. If this happened, the entry would remain in unacknowledged_ids_ and the extension wouldn't have an entry in shown_ids_, so that if the extension later became loaded (or another external extension was installed), the extension would no longer be present in disabled extensions in the registry. This caused a failed CHECK() in ExternalInstallManager::UpdateExternalExtensionAlert(). Fix this case by properly erasing the entry from unacknowledged_ids_ when the extension reaches the prompt count. Add a unittest to cover the case. Bug: 736292 Change-Id: If7cbf87e3a757e66930c0cfda40ed229a2e37166 Reviewed-on: https://chromium-review.googlesource.com/1012491Reviewed-by:Karan Bhatia <karandeepb@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#551772}
Showing
Please register or sign in to comment