| Index: extensions/browser/lazy_background_task_queue.cc
|
| diff --git a/extensions/browser/lazy_background_task_queue.cc b/extensions/browser/lazy_background_task_queue.cc
|
| index 5ac92de54bf2c805573d6e17b03850d7049d8583..754e59264b50b951f51ed430804d109a5e66ec95 100644
|
| --- a/extensions/browser/lazy_background_task_queue.cc
|
| +++ b/extensions/browser/lazy_background_task_queue.cc
|
| @@ -13,7 +13,6 @@
|
| #include "content/public/browser/web_contents.h"
|
| #include "extensions/browser/extension_host.h"
|
| #include "extensions/browser/extension_registry.h"
|
| -#include "extensions/browser/extension_system.h"
|
| #include "extensions/browser/extensions_browser_client.h"
|
| #include "extensions/browser/notification_types.h"
|
| #include "extensions/browser/process_manager.h"
|
| @@ -47,9 +46,7 @@ bool LazyBackgroundTaskQueue::ShouldEnqueueTask(
|
| // extension tasks.
|
| DCHECK(extension);
|
| if (BackgroundInfo::HasBackgroundPage(extension)) {
|
| - ProcessManager* pm = ExtensionSystem::Get(
|
| - browser_context)->process_manager();
|
| - DCHECK(pm);
|
| + ProcessManager* pm = ProcessManager::Get(browser_context);
|
| ExtensionHost* background_host =
|
| pm->GetBackgroundHostForExtension(extension->id());
|
| if (!background_host || !background_host->did_stop_loading())
|
| @@ -82,8 +79,7 @@ void LazyBackgroundTaskQueue::AddPendingTask(
|
| if (extension && BackgroundInfo::HasLazyBackgroundPage(extension)) {
|
| // If this is the first enqueued task, and we're not waiting for the
|
| // background page to unload, ensure the background page is loaded.
|
| - ProcessManager* pm = ExtensionSystem::Get(
|
| - browser_context)->process_manager();
|
| + ProcessManager* pm = ProcessManager::Get(browser_context);
|
| pm->IncrementLazyKeepaliveCount(extension);
|
| // Creating the background host may fail, e.g. if |profile| is incognito
|
| // but the extension isn't enabled in incognito mode.
|
| @@ -130,8 +126,8 @@ void LazyBackgroundTaskQueue::ProcessPendingTasks(
|
| // Balance the keepalive in AddPendingTask. Note we don't do this on a
|
| // failure to load, because the keepalive count is reset in that case.
|
| if (host && BackgroundInfo::HasLazyBackgroundPage(extension)) {
|
| - ExtensionSystem::Get(browser_context)->process_manager()->
|
| - DecrementLazyKeepaliveCount(extension);
|
| + ProcessManager::Get(browser_context)
|
| + ->DecrementLazyKeepaliveCount(extension);
|
| }
|
| }
|
|
|
|
|