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

Unified Diff: extensions/browser/lazy_background_task_queue_factory.cc

Issue 1129063011: Extract LazyBackgroundTaskQueue from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased from master Created 5 years, 7 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
« no previous file with comments | « extensions/browser/lazy_background_task_queue_factory.h ('k') | extensions/browser/mock_extension_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/lazy_background_task_queue_factory.cc
diff --git a/chrome/browser/extensions/error_console/error_console_factory.cc b/extensions/browser/lazy_background_task_queue_factory.cc
similarity index 53%
copy from chrome/browser/extensions/error_console/error_console_factory.cc
copy to extensions/browser/lazy_background_task_queue_factory.cc
index 7ae25b0952419bbaba655bc4cc8b95f9ea5abc0e..be9d8c70366ecca712af68667d6b80a48f7b2d25 100644
--- a/chrome/browser/extensions/error_console/error_console_factory.cc
+++ b/extensions/browser/lazy_background_task_queue_factory.cc
@@ -2,46 +2,46 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/error_console/error_console_factory.h"
+#include "extensions/browser/lazy_background_task_queue_factory.h"
-#include "chrome/browser/extensions/error_console/error_console.h"
-#include "chrome/browser/profiles/profile.h"
+//#include "chrome/browser/profiles/profile.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "extensions/browser/extension_registry_factory.h"
#include "extensions/browser/extensions_browser_client.h"
+#include "extensions/browser/lazy_background_task_queue.h"
using content::BrowserContext;
namespace extensions {
// static
-ErrorConsole* ErrorConsoleFactory::GetForBrowserContext(
+LazyBackgroundTaskQueue* LazyBackgroundTaskQueueFactory::GetForBrowserContext(
BrowserContext* context) {
- return static_cast<ErrorConsole*>(
+ return static_cast<LazyBackgroundTaskQueue*>(
GetInstance()->GetServiceForBrowserContext(context, true));
}
// static
-ErrorConsoleFactory* ErrorConsoleFactory::GetInstance() {
- return Singleton<ErrorConsoleFactory>::get();
+LazyBackgroundTaskQueueFactory* LazyBackgroundTaskQueueFactory::GetInstance() {
+ return Singleton<LazyBackgroundTaskQueueFactory>::get();
}
-ErrorConsoleFactory::ErrorConsoleFactory()
+LazyBackgroundTaskQueueFactory::LazyBackgroundTaskQueueFactory()
: BrowserContextKeyedServiceFactory(
- "ErrorConsole",
+ "LazyBackgroundTaskQueue",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionRegistryFactory::GetInstance());
}
-ErrorConsoleFactory::~ErrorConsoleFactory() {
+LazyBackgroundTaskQueueFactory::~LazyBackgroundTaskQueueFactory() {
}
-KeyedService* ErrorConsoleFactory::BuildServiceInstanceFor(
+KeyedService* LazyBackgroundTaskQueueFactory::BuildServiceInstanceFor(
BrowserContext* context) const {
- return new ErrorConsole(Profile::FromBrowserContext(context));
+ return new LazyBackgroundTaskQueue(context);
}
-BrowserContext* ErrorConsoleFactory::GetBrowserContextToUse(
+BrowserContext* LazyBackgroundTaskQueueFactory::GetBrowserContextToUse(
BrowserContext* context) const {
// Redirected in incognito.
return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
« no previous file with comments | « extensions/browser/lazy_background_task_queue_factory.h ('k') | extensions/browser/mock_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698