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

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

Issue 12494028: Move Requirements out of Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Move Requirements from API Created 7 years, 9 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/chrome_manifest_parser.cc
diff --git a/chrome/browser/extensions/manifest_url_parser.cc b/chrome/browser/extensions/chrome_manifest_parser.cc
similarity index 71%
rename from chrome/browser/extensions/manifest_url_parser.cc
rename to chrome/browser/extensions/chrome_manifest_parser.cc
index 6079d74be1797094a8db9c9af2c3eafcd598cc37..8d2c35bcf4b8c957504a26acc42439cc52cf0322 100644
--- a/chrome/browser/extensions/manifest_url_parser.cc
+++ b/chrome/browser/extensions/chrome_manifest_parser.cc
@@ -2,25 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/extensions/manifest_url_parser.h"
+#include "chrome/browser/extensions/chrome_manifest_parser.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/requirements_handler.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 {
-ManifestURLParser::ManifestURLParser(Profile* profile)
+ChromeManifestParser::ChromeManifestParser(Profile* profile)
: profile_(profile) {
(new DevToolsPageHandler)->Register();
(new HomepageURLHandler)->Register();
(new UpdateURLHandler)->Register();
(new OptionsPageHandler)->Register();
(new URLOverridesHandler)->Register();
+ (new RequirementsHandler)->Register();
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
content::Source<Profile>(profile));
@@ -28,12 +30,13 @@ ManifestURLParser::ManifestURLParser(Profile* profile)
content::Source<Profile>(profile));
}
-ManifestURLParser::~ManifestURLParser() {
+ChromeManifestParser::~ChromeManifestParser() {
}
-void ManifestURLParser::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+void ChromeManifestParser::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
const Extension* extension =
content::Details<const Extension>(details).ptr();
@@ -48,12 +51,12 @@ void ManifestURLParser::Observe(int type,
}
}
-static base::LazyInstance<ProfileKeyedAPIFactory<ManifestURLParser> >
-g_factory = LAZY_INSTANCE_INITIALIZER;
+static base::LazyInstance<ProfileKeyedAPIFactory<ChromeManifestParser> >
+ g_factory = LAZY_INSTANCE_INITIALIZER;
// static
-ProfileKeyedAPIFactory<ManifestURLParser>*
- ManifestURLParser::GetFactoryInstance() {
+ProfileKeyedAPIFactory<ChromeManifestParser>*
+ChromeManifestParser::GetFactoryInstance() {
return &g_factory.Get();
}
« no previous file with comments | « chrome/browser/extensions/chrome_manifest_parser.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698