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

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

Issue 13997002: Load extensions features file separately when needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix merge conflicts Created 7 years, 8 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/features/feature_provider.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/manifest.cc
diff --git a/chrome/common/extensions/manifest.cc b/chrome/common/extensions/manifest.cc
index 04dd09744e8d07b66f90f252b5935cd46e61b855..78ae18970dff321b9bac854b4ea2ae5ad1f0fcac 100644
--- a/chrome/common/extensions/manifest.cc
+++ b/chrome/common/extensions/manifest.cc
@@ -139,16 +139,15 @@ bool Manifest::ValidateManifest(
// TODO(aa): Consider having an error here in the case of strict error
// checking to let developers know when they screw up.
- std::set<std::string> feature_names =
- BaseFeatureProvider::GetManifestFeatures()->GetAllFeatureNames();
+ FeatureProvider* provider = BaseFeatureProvider::GetByName("manifest");
+ std::set<std::string> feature_names = provider->GetAllFeatureNames();
for (std::set<std::string>::iterator feature_name = feature_names.begin();
feature_name != feature_names.end(); ++feature_name) {
// Use Get instead of HasKey because the former uses path expansion.
if (!value_->Get(*feature_name, NULL))
continue;
- Feature* feature =
- BaseFeatureProvider::GetManifestFeatures()->GetFeature(*feature_name);
+ Feature* feature = provider->GetFeature(*feature_name);
Feature::Availability result = feature->IsAvailableToManifest(
extension_id_, type_, Feature::ConvertLocation(location_),
GetManifestVersion());
@@ -160,7 +159,7 @@ bool Manifest::ValidateManifest(
// Also generate warnings for keys that are not features.
for (base::DictionaryValue::Iterator it(*value_); !it.IsAtEnd();
it.Advance()) {
- if (!BaseFeatureProvider::GetManifestFeatures()->GetFeature(it.key())) {
+ if (!provider->GetFeature(it.key())) {
warnings->push_back(InstallWarning(
InstallWarning::FORMAT_TEXT,
base::StringPrintf("Unrecognized manifest key '%s'.",
@@ -248,7 +247,7 @@ bool Manifest::CanAccessPath(const std::string& path) const {
bool Manifest::CanAccessKey(const std::string& key) const {
Feature* feature =
- BaseFeatureProvider::GetManifestFeatures()->GetFeature(key);
+ BaseFeatureProvider::GetByName("manifest")->GetFeature(key);
if (!feature)
return true;
« no previous file with comments | « chrome/common/extensions/features/feature_provider.h ('k') | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698