| Index: extensions/browser/api/runtime/runtime_api.cc
|
| diff --git a/extensions/browser/api/runtime/runtime_api.cc b/extensions/browser/api/runtime/runtime_api.cc
|
| index cc90d3732c2e5824609fc4a5bcd590550cc02628..6e23721f2a9348514a0e1dfcfed7a4b8614ed967 100644
|
| --- a/extensions/browser/api/runtime/runtime_api.cc
|
| +++ b/extensions/browser/api/runtime/runtime_api.cc
|
| @@ -95,13 +95,12 @@ void DispatchOnStartupEventImpl(BrowserContext* browser_context,
|
| extension_id);
|
| if (extension && BackgroundInfo::HasPersistentBackgroundPage(extension) &&
|
| first_call &&
|
| - system->lazy_background_task_queue()->ShouldEnqueueTask(browser_context,
|
| - extension)) {
|
| - system->lazy_background_task_queue()->AddPendingTask(
|
| - browser_context,
|
| - extension_id,
|
| - base::Bind(
|
| - &DispatchOnStartupEventImpl, browser_context, extension_id, false));
|
| + LazyBackgroundTaskQueue::Get(browser_context)
|
| + ->ShouldEnqueueTask(browser_context, extension)) {
|
| + LazyBackgroundTaskQueue::Get(browser_context)
|
| + ->AddPendingTask(browser_context, extension_id,
|
| + base::Bind(&DispatchOnStartupEventImpl,
|
| + browser_context, extension_id, false));
|
| return;
|
| }
|
|
|
| @@ -404,15 +403,14 @@ void RuntimeEventRouter::OnExtensionUninstalled(
|
| }
|
|
|
| ExtensionFunction::ResponseAction RuntimeGetBackgroundPageFunction::Run() {
|
| - ExtensionSystem* system = ExtensionSystem::Get(browser_context());
|
| ExtensionHost* host = ProcessManager::Get(browser_context())
|
| ->GetBackgroundHostForExtension(extension_id());
|
| - if (system->lazy_background_task_queue()->ShouldEnqueueTask(browser_context(),
|
| - extension())) {
|
| - system->lazy_background_task_queue()->AddPendingTask(
|
| - browser_context(),
|
| - extension_id(),
|
| - base::Bind(&RuntimeGetBackgroundPageFunction::OnPageLoaded, this));
|
| + if (LazyBackgroundTaskQueue::Get(browser_context())
|
| + ->ShouldEnqueueTask(browser_context(), extension())) {
|
| + LazyBackgroundTaskQueue::Get(browser_context())
|
| + ->AddPendingTask(
|
| + browser_context(), extension_id(),
|
| + base::Bind(&RuntimeGetBackgroundPageFunction::OnPageLoaded, this));
|
| } else if (host) {
|
| OnPageLoaded(host);
|
| } else {
|
|
|