Introduce runtime.onSuspendCanceled() event.
runtime.onSuspendCanceled() is sent after runtime.onSuspend() to indicate that
the extension / app will not be suspended after all.
BUG=136469
Review URL: https://chromiumcodereview.appspot.com/10804020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148490 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/lazy_background_task_queue.cc b/chrome/browser/extensions/lazy_background_task_queue.cc
index 49bc222..89bf38e 100644
--- a/chrome/browser/extensions/lazy_background_task_queue.cc
+++ b/chrome/browser/extensions/lazy_background_task_queue.cc
@@ -48,9 +48,10 @@
ExtensionSystem::Get(profile)->process_manager();
ExtensionHost* background_host =
pm->GetBackgroundHostForExtension(extension->id());
- if (!background_host || !background_host->did_stop_loading() ||
- pm->IsBackgroundHostClosing(extension->id()))
+ if (!background_host || !background_host->did_stop_loading())
return true;
+ if (pm->IsBackgroundHostClosing(extension->id()))
+ pm->CancelSuspend(extension);
}
return false;