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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 11968032: Move 'theme' parsing out of Extension class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ManifestHandler registration in theme_service Created 7 years, 11 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/utility/chrome_content_utility_client.cc
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
index e372ebf76575309c91f351261406ffaa0eb4356f..643a37428006d285ea82f4293f6ef9e7fa546919 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -19,6 +19,9 @@
#include "chrome/common/chrome_utility_messages.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_l10n_util.h"
+#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest_handler.h"
+#include "chrome/common/extensions/theme_handler.h"
#include "chrome/common/extensions/unpacker.h"
#include "chrome/common/extensions/update_manifest.h"
#include "chrome/common/web_resource/web_resource_unpacker.h"
@@ -42,6 +45,16 @@
#include "ui/gfx/gdi_util.h"
#endif // defined(OS_WIN)
+namespace {
+
+// Explicitly register all ManifestHandlers needed in the utility process.
+void RegisterExtensionManifestHandlers() {
+ extensions::ManifestHandler::Register(extension_manifest_keys::kTheme,
+ new extensions::ThemeHandler);
+}
+
+} // namespace
+
namespace chrome {
ChromeContentUtilityClient::ChromeContentUtilityClient() {
@@ -116,6 +129,7 @@ void ChromeContentUtilityClient::OnUnpackExtension(
int creation_flags) {
CHECK(location > extensions::Extension::INVALID);
CHECK(location < extensions::Extension::NUM_LOCATIONS);
+ RegisterExtensionManifestHandlers();
extensions::Unpacker unpacker(
extension_path,
extension_id,
« chrome/common/extensions/theme_handler.h ('K') | « chrome/common/extensions/unpacker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698