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

Unified Diff: chrome/browser/extensions/error_console/error_console_factory.cc

Issue 1139643005: Extract ErrorConsole from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use ErrorConsole::Get, update year for copyright lines 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
Index: chrome/browser/extensions/error_console/error_console_factory.cc
diff --git a/extensions/browser/warning_service_factory.cc b/chrome/browser/extensions/error_console/error_console_factory.cc
similarity index 53%
copy from extensions/browser/warning_service_factory.cc
copy to chrome/browser/extensions/error_console/error_console_factory.cc
index 9f0bc09b19181318a14ad6e45161b06163b3f86f..7ae25b0952419bbaba655bc4cc8b95f9ea5abc0e 100644
--- a/extensions/browser/warning_service_factory.cc
+++ b/chrome/browser/extensions/error_console/error_console_factory.cc
@@ -1,46 +1,47 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/warning_service_factory.h"
+#include "chrome/browser/extensions/error_console/error_console_factory.h"
+#include "chrome/browser/extensions/error_console/error_console.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/warning_service.h"
using content::BrowserContext;
namespace extensions {
// static
-WarningService* WarningServiceFactory::GetForBrowserContext(
+ErrorConsole* ErrorConsoleFactory::GetForBrowserContext(
BrowserContext* context) {
- return static_cast<WarningService*>(
+ return static_cast<ErrorConsole*>(
GetInstance()->GetServiceForBrowserContext(context, true));
}
// static
-WarningServiceFactory* WarningServiceFactory::GetInstance() {
- return Singleton<WarningServiceFactory>::get();
+ErrorConsoleFactory* ErrorConsoleFactory::GetInstance() {
+ return Singleton<ErrorConsoleFactory>::get();
}
-WarningServiceFactory::WarningServiceFactory()
+ErrorConsoleFactory::ErrorConsoleFactory()
: BrowserContextKeyedServiceFactory(
- "WarningService",
+ "ErrorConsole",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(ExtensionRegistryFactory::GetInstance());
}
-WarningServiceFactory::~WarningServiceFactory() {
+ErrorConsoleFactory::~ErrorConsoleFactory() {
}
-KeyedService* WarningServiceFactory::BuildServiceInstanceFor(
+KeyedService* ErrorConsoleFactory::BuildServiceInstanceFor(
BrowserContext* context) const {
- return new WarningService(context);
+ return new ErrorConsole(Profile::FromBrowserContext(context));
}
-BrowserContext* WarningServiceFactory::GetBrowserContextToUse(
+BrowserContext* ErrorConsoleFactory::GetBrowserContextToUse(
BrowserContext* context) const {
// Redirected in incognito.
return ExtensionsBrowserClient::Get()->GetOriginalContext(context);
« no previous file with comments | « chrome/browser/extensions/error_console/error_console_factory.h ('k') | chrome/browser/extensions/extension_system_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698