summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/background_mode_manager.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/background_mode_manager.cc b/chrome/browser/background_mode_manager.cc
index b6c6a4d..5ef5c64 100644
--- a/chrome/browser/background_mode_manager.cc
+++ b/chrome/browser/background_mode_manager.cc
@@ -132,6 +132,14 @@ void BackgroundModeManager::Observe(NotificationType type,
case NotificationType::EXTENSION_UNLOADED:
if (BackgroundApplicationListModel::IsBackgroundApp(
*Details<UnloadedExtensionInfo>(details)->extension)) {
+ Details<UnloadedExtensionInfo> info =
+ Details<UnloadedExtensionInfo>(details);
+ // If we already got an unload notification when it was disabled, ignore
+ // this one.
+ // TODO(atwilson): Change BackgroundModeManager to use
+ // BackgroundApplicationListModel instead of tracking the count here.
+ if (info->already_disabled)
+ return;
OnBackgroundAppUnloaded();
OnBackgroundAppUninstalled();
}