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

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: no find copies! 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
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 4f2fbc2d0ca94f5e13193f50a9c652feb4bbd183..7c889c7b6af750b8253bae449d8b1196742a8e76 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -37,6 +37,7 @@
#include "extensions/common/features/manifest_feature.h"
#include "extensions/common/features/permission_feature.h"
#include "extensions/common/features/simple_feature.h"
+#include "extensions/common/features/switch_feature.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handler.h"
#include "extensions/common/manifest_handlers/icons_handler.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 == "switch") {
+ provider.reset(new BaseFeatureProvider(source->dictionary(),
+ CreateFeature<SwitchFeature>));
} 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 == "switch") {
+ source->LoadJSON(IDR_EXTENSION_SWITCH_FEATURES);
} else {
NOTREACHED();
source.reset();

Powered by Google App Engine
This is Rietveld 408576698