diff options
author | kalman <kalman@chromium.org> | 2014-12-14 19:59:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-15 03:59:33 +0000 |
commit | 64210328fe91376da6cf6a21ac16db72efa6118a (patch) | |
tree | 7ff1c62a09228eb7215c2bf66f2229e8a098f638 /extensions/shell/common | |
parent | 60e5f1185e04c0bcb43f82b2e224de2ad463abee (diff) | |
download | chromium_src-64210328fe91376da6cf6a21ac16db72efa6118a.zip chromium_src-64210328fe91376da6cf6a21ac16db72efa6118a.tar.gz chromium_src-64210328fe91376da6cf6a21ac16db72efa6118a.tar.bz2 |
Add the basic infrastructure for the Behavior feature type: BehaviorFeature and
_behavior_features.json. Arbitrarily use it to implement the allow-in-incognito
whitelist.
BUG=440194
R=rockot@chromium.org
Review URL: https://codereview.chromium.org/789383002
Cr-Commit-Position: refs/heads/master@{#308311}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r-- | extensions/shell/common/shell_extensions_client.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/shell/common/shell_extensions_client.cc b/extensions/shell/common/shell_extensions_client.cc index 3f7bc48..d20a608cd 100644 --- a/extensions/shell/common/shell_extensions_client.cc +++ b/extensions/shell/common/shell_extensions_client.cc @@ -11,6 +11,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/json_feature_provider_source.h" #include "extensions/common/features/manifest_feature.h" #include "extensions/common/features/permission_feature.h" @@ -115,6 +116,9 @@ scoped_ptr<FeatureProvider> ShellExtensionsClient::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(); } @@ -133,6 +137,8 @@ ShellExtensionsClient::CreateFeatureProviderSource( source->LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES); } else if (name == "permission") { source->LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES); + } else if (name == "behavior") { + source->LoadJSON(IDR_EXTENSION_BEHAVIOR_FEATURES); } else { NOTREACHED(); source.reset(); |