Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/browser/extensions/lazy_background_task_queue.cc

Issue 10804020: Introduce runtime.onSuspendCanceled() event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comments Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/lazy_background_task_queue.cc
diff --git a/chrome/browser/extensions/lazy_background_task_queue.cc b/chrome/browser/extensions/lazy_background_task_queue.cc
index 6c69ef128b63530a949e1be65210092d3bfd49b5..7c083a5c9b4aefa514d6c8799195d577273420be 100644
--- a/chrome/browser/extensions/lazy_background_task_queue.cc
+++ b/chrome/browser/extensions/lazy_background_task_queue.cc
@@ -50,6 +50,8 @@ bool LazyBackgroundTaskQueue::ShouldEnqueueTask(
pm->GetBackgroundHostForExtension(extension->id());
if (!background_host || !background_host->did_stop_loading())
return true;
+ if (pm->IsBackgroundHostClosing(extension->id()))
+ pm->CancelSuspend(extension);
}
return false;
@@ -92,8 +94,7 @@ void LazyBackgroundTaskQueue::StartLazyBackgroundPage(
extensions()->GetByID(extension_id);
if (extension) {
DCHECK(extension->has_lazy_background_page());
- pm->IncrementLazyKeepaliveCount(
- extension, ExtensionProcessManager::DONT_CANCEL_SUSPEND);
+ pm->IncrementLazyKeepaliveCount(extension);
pm->CreateBackgroundHost(extension, extension->GetBackgroundURL());
}

Powered by Google App Engine
This is Rietveld 408576698