Use EXTENSION_REMOVED to reset IconImage's extension pointer
commit8c17903df6d4345b2c826f3b027989d3fbbad9c2
authortbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Mar 2014 22:49:10 +0000 (20 22:49 +0000)
committertbarzic@chromium.org <tbarzic@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 20 Mar 2014 22:49:10 +0000 (20 22:49 +0000)
treedabc119325e6a0b4ee1e727348e922d5c04e35a7
parent722f979e1436708617247da4f27a58cf83f0d901
Use EXTENSION_REMOVED to reset IconImage's extension pointer

EXTENSION_REMOVED is more suitable than EXTENSION_UNLOADED, as
the purpose of resetting the extension_ pointer is to ensure it's not
used after the extension gets removed. EXTENSION_UNLOADED does not
match that task, as it may not be dispatched when an extension gets
removed (e.g. for disabled extension).
Also, EXTENSION_UNLOADED may be dispatched in few situation when it's
not desirable to invalidate IconImage's image loading (e.g. when an
extension gets disabled)

Also, reload app list icon when disabled extension gets updated (as in
this case there is no EXTENSION_LOADED notification)

BUG=343978,277907

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258443 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/extensions/extension_icon_image.cc
chrome/browser/extensions/install_observer.cc
chrome/browser/extensions/install_observer.h
chrome/browser/extensions/install_tracker.cc
chrome/browser/ui/app_list/extension_app_model_builder.cc
chrome/browser/ui/app_list/extension_app_model_builder.h