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

Unified Diff: chrome/browser/extensions/extension_web_ui_override_registrar.cc

Issue 14694010: Consolidate manifest handler registration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/extension_web_ui_override_registrar.cc
diff --git a/chrome/browser/extensions/chrome_manifest_parser.cc b/chrome/browser/extensions/extension_web_ui_override_registrar.cc
similarity index 52%
rename from chrome/browser/extensions/chrome_manifest_parser.cc
rename to chrome/browser/extensions/extension_web_ui_override_registrar.cc
index 9f89bbf86f1d19517c3cc601bf227767355903a0..fcf52767276887b72d8907a2bdb0bcab8ed26486 100644
--- a/chrome/browser/extensions/chrome_manifest_parser.cc
+++ b/chrome/browser/extensions/extension_web_ui_override_registrar.cc
@@ -2,48 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/chrome_manifest_parser.h"
+#include "chrome/browser/extensions/extension_web_ui_override_registrar.h"
#include "base/lazy_instance.h"
#include "chrome/browser/extensions/extension_web_ui.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/extensions/manifest_handlers/app_isolation_info.h"
-#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
-#include "chrome/common/extensions/manifest_handlers/kiosk_enabled_info.h"
-#include "chrome/common/extensions/manifest_handlers/offline_enabled_info.h"
-#include "chrome/common/extensions/manifest_handlers/requirements_handler.h"
-#include "chrome/common/extensions/manifest_handlers/shared_module_info.h"
-#include "chrome/common/extensions/manifest_url_handler.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
namespace extensions {
-ChromeManifestParser::ChromeManifestParser(Profile* profile)
- : profile_(profile) {
- (new AppIsolationHandler)->Register();
- (new DevToolsPageHandler)->Register();
- (new KioskEnabledHandler)->Register();
- (new HomepageURLHandler)->Register();
- (new IconsHandler)->Register();
- (new OfflineEnabledHandler)->Register();
- (new OptionsPageHandler)->Register();
- (new RequirementsHandler)->Register();
- (new SharedModuleHandler)->Register();
- (new UpdateURLHandler)->Register();
- (new URLOverridesHandler)->Register();
-
+ExtensionWebUIOverrideRegistrar::ExtensionWebUIOverrideRegistrar(
+ Profile* profile) : profile_(profile) {
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
content::Source<Profile>(profile));
}
-ChromeManifestParser::~ChromeManifestParser() {
+ExtensionWebUIOverrideRegistrar::~ExtensionWebUIOverrideRegistrar() {
}
-void ChromeManifestParser::Observe(
+void ExtensionWebUIOverrideRegistrar::Observe(
int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
@@ -61,12 +42,13 @@ void ChromeManifestParser::Observe(
}
}
-static base::LazyInstance<ProfileKeyedAPIFactory<ChromeManifestParser> >
+static base::LazyInstance<
+ ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar> >
g_factory = LAZY_INSTANCE_INITIALIZER;
// static
-ProfileKeyedAPIFactory<ChromeManifestParser>*
-ChromeManifestParser::GetFactoryInstance() {
+ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>*
+ExtensionWebUIOverrideRegistrar::GetFactoryInstance() {
return &g_factory.Get();
}
« no previous file with comments | « chrome/browser/extensions/extension_web_ui_override_registrar.h ('k') | chrome/browser/extensions/image_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698