#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"
// 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())
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.
// 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);
}
}