summaryrefslogtreecommitdiffstats
path: root/extensions/browser/lazy_background_task_queue.cc
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-30 00:41:24 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-30 00:41:24 +0000
commit59b0e604edbb08da5e5f5aff8fa1832c381452ad (patch)
tree11e19df686f8ad68eec53a77e53f5a8fb38662ab /extensions/browser/lazy_background_task_queue.cc
parentb54602651640ac17a44429303fbd9bd30f922c61 (diff)
downloadchromium_src-59b0e604edbb08da5e5f5aff8fa1832c381452ad.zip
chromium_src-59b0e604edbb08da5e5f5aff8fa1832c381452ad.tar.gz
chromium_src-59b0e604edbb08da5e5f5aff8fa1832c381452ad.tar.bz2
Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1.
This moves ExtensionSystem to extensions/browser. It also moves setting the channel for Features to ChromeExtensionsBrowserClient. It also removes the duplicate ExtensionSystem::GetForBrowserContext. BUG=337707 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/147923005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/lazy_background_task_queue.cc')
-rw-r--r--extensions/browser/lazy_background_task_queue.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/browser/lazy_background_task_queue.cc b/extensions/browser/lazy_background_task_queue.cc
index 2a52503..2b38ce9 100644
--- a/extensions/browser/lazy_background_task_queue.cc
+++ b/extensions/browser/lazy_background_task_queue.cc
@@ -7,7 +7,6 @@
#include "base/callback.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_host.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "chrome/common/extensions/extension_messages.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/notification_service.h"
@@ -16,6 +15,7 @@
#include "content/public/browser/site_instance.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_system.h"
#include "extensions/browser/extensions_browser_client.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/process_map.h"
@@ -44,7 +44,7 @@ bool LazyBackgroundTaskQueue::ShouldEnqueueTask(
const Extension* extension) {
DCHECK(extension);
if (BackgroundInfo::HasBackgroundPage(extension)) {
- ProcessManager* pm = ExtensionSystem::GetForBrowserContext(
+ ProcessManager* pm = ExtensionSystem::Get(
browser_context)->process_manager();
DCHECK(pm);
ExtensionHost* background_host =
@@ -79,7 +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::GetForBrowserContext(
+ ProcessManager* pm = ExtensionSystem::Get(
browser_context)->process_manager();
pm->IncrementLazyKeepaliveCount(extension);
// Creating the background host may fail, e.g. if |profile| is incognito
@@ -127,7 +127,7 @@ 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::GetForBrowserContext(browser_context)->process_manager()->
+ ExtensionSystem::Get(browser_context)->process_manager()->
DecrementLazyKeepaliveCount(extension);
}
}