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

Unified Diff: chrome/utility/chrome_content_utility_client.cc

Issue 12042096: Move page action manifest parsing out of Extension; the first multi-key manifest handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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..5537f2cf5f365c78df97425afe60baa8ea3eaf20 100644
--- a/chrome/utility/chrome_content_utility_client.cc
+++ b/chrome/utility/chrome_content_utility_client.cc
@@ -17,8 +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/page_action_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_l10n_util.h"
+#include "chrome/common/extensions/manifest_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 +44,17 @@
#include "ui/gfx/gdi_util.h"
#endif // defined(OS_WIN)
+namespace {
+
+// Explicitly register all extension ManifestHandlers needed to parse
+// fields used in the utility process.
+void RegisterExtensionManifestHandlers() {
+ extensions::ManifestMultiKeyHandler::Register(
+ new extensions::PageActionHandler);
+}
+
+} // 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,

Powered by Google App Engine
This is Rietveld 408576698