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

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

Issue 789383002: Add the basic infrastructure for the Behavior feature type: BehaviorFeature and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flag-features
Patch Set: rebase Created 6 years 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/browser/extensions/extension_util.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/chrome_extensions_client.cc
diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc
index d3294e5a22387bf1924187ce0bce5f268091a3df..9a7ae150f1983cdf2b66edb1c8ebcef66ed19573 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -32,6 +32,7 @@
#include "extensions/common/extension_urls.h"
#include "extensions/common/features/api_feature.h"
#include "extensions/common/features/base_feature_provider.h"
+#include "extensions/common/features/behavior_feature.h"
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/features/manifest_feature.h"
@@ -144,6 +145,9 @@ scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider(
} else if (name == "permission") {
provider.reset(new BaseFeatureProvider(source->dictionary(),
CreateFeature<PermissionFeature>));
+ } else if (name == "behavior") {
+ provider.reset(new BaseFeatureProvider(source->dictionary(),
+ CreateFeature<BehaviorFeature>));
} else {
NOTREACHED();
}
@@ -164,6 +168,8 @@ ChromeExtensionsClient::CreateFeatureProviderSource(
} else if (name == "permission") {
source->LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
source->LoadJSON(IDR_CHROME_EXTENSION_PERMISSION_FEATURES);
+ } else if (name == "behavior") {
+ source->LoadJSON(IDR_EXTENSION_BEHAVIOR_FEATURES);
} else {
NOTREACHED();
source.reset();
« no previous file with comments | « chrome/browser/extensions/extension_util.cc ('k') | extensions/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698