summaryrefslogtreecommitdiffstats
path: root/chrome/utility/chrome_content_utility_client.cc
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 06:40:47 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-06 06:40:47 +0000
commitd592b1bd3f4cbf2e79c49a7efb9fed1a94f30a72 (patch)
treeec48741e2d3b7b9497a4a2d743817ac569ac4f13 /chrome/utility/chrome_content_utility_client.cc
parent1db38953838ce147ee0d599b63bec1326e983f7a (diff)
downloadchromium_src-d592b1bd3f4cbf2e79c49a7efb9fed1a94f30a72.zip
chromium_src-d592b1bd3f4cbf2e79c49a7efb9fed1a94f30a72.tar.gz
chromium_src-d592b1bd3f4cbf2e79c49a7efb9fed1a94f30a72.tar.bz2
Consolidate manifest handler registration.
BUG=229467 Review URL: https://chromiumcodereview.appspot.com/14694010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198394 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility/chrome_content_utility_client.cc')
-rw-r--r--chrome/utility/chrome_content_utility_client.cc30
1 files changed, 3 insertions, 27 deletions
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index 46a6c0e..a5c0605 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -17,17 +17,10 @@
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_utility_messages.h"
-#include "chrome/common/extensions/api/extension_action/browser_action_handler.h"
-#include "chrome/common/extensions/api/extension_action/page_action_handler.h"
-#include "chrome/common/extensions/api/i18n/default_locale_handler.h"
-#include "chrome/common/extensions/api/plugins/plugins_handler.h"
-#include "chrome/common/extensions/background_info.h"
+#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_l10n_util.h"
-#include "chrome/common/extensions/incognito_handler.h"
#include "chrome/common/extensions/manifest.h"
-#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
-#include "chrome/common/extensions/manifest_handlers/theme_handler.h"
#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
#include "chrome/common/extensions/unpacker.h"
#include "chrome/common/extensions/update_manifest.h"
@@ -53,22 +46,6 @@
#include "ui/gfx/gdi_util.h"
#endif // defined(OS_WIN)
-namespace {
-
-// Explicitly register all ManifestHandlers needed in the utility process.
-void RegisterExtensionManifestHandlers() {
- (new extensions::BackgroundManifestHandler)->Register();
- (new extensions::BrowserActionHandler)->Register();
- (new extensions::DefaultLocaleHandler)->Register();
- (new extensions::IconsHandler)->Register();
- (new extensions::IncognitoHandler)->Register();
- (new extensions::PageActionHandler)->Register();
- (new extensions::PluginsHandler)->Register();
- (new extensions::ThemeHandler)->Register();
-}
-
-} // namespace
-
namespace chrome {
ChromeContentUtilityClient::ChromeContentUtilityClient() {
@@ -146,10 +123,9 @@ void ChromeContentUtilityClient::OnUnpackExtension(
int creation_flags) {
CHECK(location > extensions::Manifest::INVALID_LOCATION);
CHECK(location < extensions::Manifest::NUM_LOCATIONS);
- extensions::ChromeAPIPermissions permissions;
extensions::PermissionsInfo::GetInstance()->InitializeWithDelegate(
- permissions);
- RegisterExtensionManifestHandlers();
+ extensions::ChromeAPIPermissions());
+ extensions::RegisterChromeManifestHandlers();
extensions::Unpacker unpacker(
extension_path,
extension_id,