Clear app ordinals after sending uninstall notifications.
If AppLauncherHandler handles uninstall notifications, its CreateAppInfo sets ordinals, even for apps that are being uninstalled. We need to clear the ordinals afterward.
BUG=293243
TEST=In a new profile, drag the "welcome to Chrome" from the most visited NTP page to a new empty Apps page. Remove it. Reload the NTP. Drag the "welcome to Chrome" to a new empty Apps page again. It should appear on that empty page, rather than a different nonempty page.
Review URL: https://chromiumcodereview.appspot.com/24095011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223782 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 9256742..500e5b80 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -849,9 +849,6 @@
// any of these resources.
UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL);
- extension_prefs_->OnExtensionUninstalled(extension_id, extension->location(),
- external_uninstall);
-
// Tell the backend to start deleting installed extensions on the file thread.
if (!Manifest::IsUnpackedLocation(extension->location())) {
if (!GetFileTaskRunner()->PostTask(
@@ -905,6 +902,9 @@
PruneSharedModulesOnUninstall(extension.get());
+ extension_prefs_->OnExtensionUninstalled(extension_id, extension->location(),
+ external_uninstall);
+
// Track the uninstallation.
UMA_HISTOGRAM_ENUMERATION("Extensions.ExtensionUninstalled", 1, 2);