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

Unified Diff: chrome/common/extensions/extension.cc

Issue 12084034: Change manifest handler interface to always (implicitly) pass the entire manifest to handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tts, TODO 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
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/manifest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index ab66dc98cf2d9adb729301b6c039db3a4a621686..97f67a974e32fdad6692f85e8b848d1b70c97b77 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -1922,6 +1922,7 @@ bool Extension::LoadSharedFeatures(
string16* error) {
if (!LoadDescription(error) ||
!LoadIcons(error) ||
+ !ManifestHandler::ParseExtension(this, error) ||
!LoadPlugins(error) ||
!LoadNaClModules(error) ||
!LoadSandboxedPages(error) ||
@@ -2379,8 +2380,7 @@ bool Extension::LoadExtensionFeatures(APIPermissionSet* api_permissions,
manifest_->GetBoolean(keys::kConvertedFromUserScript,
&converted_from_user_script_);
- if (!LoadManifestHandlerFeatures(error) ||
- !LoadContentScripts(error) ||
+ if (!LoadContentScripts(error) ||
!LoadPageAction(error) ||
!LoadSystemIndicator(api_permissions, error) ||
!LoadIncognitoMode(error) ||
@@ -2390,20 +2390,6 @@ bool Extension::LoadExtensionFeatures(APIPermissionSet* api_permissions,
return true;
}
-bool Extension::LoadManifestHandlerFeatures(string16* error) {
- std::vector<std::string> keys = ManifestHandler::GetKeys();
- for (size_t i = 0; i < keys.size(); ++i) {
- Value* value = NULL;
- if (!manifest_->Get(keys[i], &value)) {
- if (!ManifestHandler::Get(keys[i])->HasNoKey(this, error))
- return false;
- } else if (!ManifestHandler::Get(keys[i])->Parse(value, this, error)) {
- return false;
- }
- }
- return true;
-}
-
bool Extension::LoadContentScripts(string16* error) {
if (!manifest_->HasKey(keys::kContentScripts))
return true;
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | chrome/common/extensions/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698