Fixed edge case for commit: 258677

The DCHECK in AddLoadingPath was failing in the case where an extension passed
all the error checks, but was not installed due to the user selecting "Cancel"
on the permissions prompt: This action prevented the
NOTIFICATION_EXTENSION_LOADED handler from unregistering the listener for
NOTIFICATION_EXTENSION_LOAD_RETRY since the extension was never successfully
loaded.

This cl unregisters the listener immediately before displaying the permissions
prompt, since we know it will not need to retry due to an error while loading
at this point.

This patch successfully passes the manual test provided by the bug reporter at:
crbug.com/357675

BUG=357675

Review URL: https://codereview.chromium.org/218493003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260984 0039d316-1c4b-4281-b951-d872f2087c98
4 files changed