summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/shell/common/shell_extensions_client.cc42
-rw-r--r--apps/shell/common/shell_extensions_client.h2
-rw-r--r--chrome/browser/bookmarks/enhanced_bookmarks_features.cc2
-rw-r--r--chrome/browser/ui/extensions/application_launch.cc2
-rw-r--r--chrome/common/extensions/chrome_extensions_client.cc46
-rw-r--r--chrome/common/extensions/chrome_extensions_client.h2
-rw-r--r--extensions/DEPS1
-rw-r--r--extensions/common/extension_api.cc3
-rw-r--r--extensions/common/extension_api.h4
-rw-r--r--extensions/common/extensions_client.h8
-rw-r--r--extensions/common/features/base_feature_provider_unittest.cc5
-rw-r--r--extensions/common/features/feature_provider.cc8
-rw-r--r--extensions/common/features/feature_provider.h8
-rw-r--r--extensions/common/manifest.cc2
-rw-r--r--extensions/common/permissions/permissions_data.cc2
-rw-r--r--extensions/renderer/api_definitions_natives.cc2
-rw-r--r--extensions/renderer/dispatcher.cc7
-rw-r--r--extensions/renderer/test_features_native_handler.cc12
-rw-r--r--extensions/test/test_extensions_client.cc12
-rw-r--r--extensions/test/test_extensions_client.h2
20 files changed, 113 insertions, 59 deletions
diff --git a/apps/shell/common/shell_extensions_client.cc b/apps/shell/common/shell_extensions_client.cc
index fe01ea3..2dac9e1 100644
--- a/apps/shell/common/shell_extensions_client.cc
+++ b/apps/shell/common/shell_extensions_client.cc
@@ -29,6 +29,7 @@ using extensions::APIPermissionSet;
using extensions::BaseFeatureProvider;
using extensions::Extension;
using extensions::FeatureProvider;
+using extensions::JSONFeatureProviderSource;
using extensions::Manifest;
using extensions::PermissionMessage;
using extensions::PermissionMessages;
@@ -119,24 +120,41 @@ ShellExtensionsClient::GetPermissionMessageProvider() const {
scoped_ptr<FeatureProvider> ShellExtensionsClient::CreateFeatureProvider(
const std::string& name) const {
- extensions::JSONFeatureProviderSource source(name);
+ scoped_ptr<FeatureProvider> provider;
+ scoped_ptr<JSONFeatureProviderSource> source(
+ CreateFeatureProviderSource(name));
if (name == "api") {
- source.LoadJSON(IDR_EXTENSION_API_FEATURES);
- source.LoadJSON(IDR_SHELL_EXTENSION_API_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<extensions::APIFeature>));
+ provider.reset(new BaseFeatureProvider(
+ source->dictionary(), CreateFeature<extensions::APIFeature>));
} else if (name == "manifest") {
- source.LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<extensions::ManifestFeature>));
+ provider.reset(new BaseFeatureProvider(
+ source->dictionary(), CreateFeature<extensions::ManifestFeature>));
} else if (name == "permission") {
- source.LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<extensions::PermissionFeature>));
+ provider.reset(new BaseFeatureProvider(
+ source->dictionary(), CreateFeature<extensions::PermissionFeature>));
} else {
NOTREACHED();
}
- return scoped_ptr<FeatureProvider>();
+ return provider.Pass();
+}
+
+scoped_ptr<JSONFeatureProviderSource>
+ShellExtensionsClient::CreateFeatureProviderSource(
+ const std::string& name) const {
+ scoped_ptr<JSONFeatureProviderSource> source(
+ new JSONFeatureProviderSource(name));
+ if (name == "api") {
+ source->LoadJSON(IDR_EXTENSION_API_FEATURES);
+ source->LoadJSON(IDR_SHELL_EXTENSION_API_FEATURES);
+ } else if (name == "manifest") {
+ source->LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
+ } else if (name == "permission") {
+ source->LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
+ } else {
+ NOTREACHED();
+ source.reset();
+ }
+ return source.Pass();
}
void ShellExtensionsClient::FilterHostPermissions(
diff --git a/apps/shell/common/shell_extensions_client.h b/apps/shell/common/shell_extensions_client.h
index 847b4a0..4ccd1a5 100644
--- a/apps/shell/common/shell_extensions_client.h
+++ b/apps/shell/common/shell_extensions_client.h
@@ -24,6 +24,8 @@ class ShellExtensionsClient : public extensions::ExtensionsClient {
GetPermissionMessageProvider() const OVERRIDE;
virtual scoped_ptr<extensions::FeatureProvider> CreateFeatureProvider(
const std::string& name) const OVERRIDE;
+ virtual scoped_ptr<extensions::JSONFeatureProviderSource>
+ CreateFeatureProviderSource(const std::string& name) const OVERRIDE;
virtual void FilterHostPermissions(
const extensions::URLPatternSet& hosts,
extensions::URLPatternSet* new_hosts,
diff --git a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
index 5ce9b9a..e8ac69b 100644
--- a/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
+++ b/chrome/browser/bookmarks/enhanced_bookmarks_features.cc
@@ -29,7 +29,7 @@ std::string GetEnhancedBookmarksExtensionIdFromFinch() {
// Returns true if enhanced bookmarks experiment is enabled from Finch.
bool IsEnhancedBookmarksExperimentEnabledFromFinch() {
std::string ext_id = GetEnhancedBookmarksExtensionIdFromFinch();
- extensions::FeatureProvider* feature_provider =
+ const extensions::FeatureProvider* feature_provider =
extensions::FeatureProvider::GetPermissionFeatures();
extensions::Feature* feature = feature_provider->GetFeature("metricsPrivate");
return feature && feature->IsIdInWhitelist(ext_id);
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc
index 23f01b9..a5e9cc17 100644
--- a/chrome/browser/ui/extensions/application_launch.cc
+++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -470,7 +470,7 @@ WebContents* OpenAppShortcutWindow(Profile* profile,
}
bool CanLaunchViaEvent(const extensions::Extension* extension) {
- extensions::FeatureProvider* feature_provider =
+ const extensions::FeatureProvider* feature_provider =
extensions::FeatureProvider::GetAPIFeatures();
extensions::Feature* feature = feature_provider->GetFeature("app.runtime");
return feature->IsAvailableToExtension(extension).is_available();
diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc
index b1cf2eb..7e0f0eb 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -19,6 +19,7 @@
#include "extensions/common/extension.h"
#include "extensions/common/features/api_feature.h"
#include "extensions/common/features/base_feature_provider.h"
+#include "extensions/common/features/feature_provider.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/features/manifest_feature.h"
#include "extensions/common/features/permission_feature.h"
@@ -99,26 +100,43 @@ ChromeExtensionsClient::GetPermissionMessageProvider() const {
scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider(
const std::string& name) const {
- JSONFeatureProviderSource source(name);
+ scoped_ptr<FeatureProvider> provider;
+ scoped_ptr<JSONFeatureProviderSource> source(
+ CreateFeatureProviderSource(name));
if (name == "api") {
- source.LoadJSON(IDR_EXTENSION_API_FEATURES);
- source.LoadJSON(IDR_CHROME_EXTENSION_API_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<APIFeature>));
+ provider.reset(new BaseFeatureProvider(source->dictionary(),
+ CreateFeature<APIFeature>));
} else if (name == "manifest") {
- source.LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
- source.LoadJSON(IDR_CHROME_EXTENSION_MANIFEST_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<ManifestFeature>));
+ provider.reset(new BaseFeatureProvider(source->dictionary(),
+ CreateFeature<ManifestFeature>));
} else if (name == "permission") {
- source.LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
- source.LoadJSON(IDR_CHROME_EXTENSION_PERMISSION_FEATURES);
- return scoped_ptr<FeatureProvider>(new BaseFeatureProvider(
- source.dictionary(), CreateFeature<PermissionFeature>));
+ provider.reset(new BaseFeatureProvider(source->dictionary(),
+ CreateFeature<PermissionFeature>));
} else {
NOTREACHED();
}
- return scoped_ptr<FeatureProvider>();
+ return provider.Pass();
+}
+
+scoped_ptr<JSONFeatureProviderSource>
+ChromeExtensionsClient::CreateFeatureProviderSource(
+ const std::string& name) const {
+ scoped_ptr<JSONFeatureProviderSource> source(
+ new JSONFeatureProviderSource(name));
+ if (name == "api") {
+ source->LoadJSON(IDR_EXTENSION_API_FEATURES);
+ source->LoadJSON(IDR_CHROME_EXTENSION_API_FEATURES);
+ } else if (name == "manifest") {
+ source->LoadJSON(IDR_EXTENSION_MANIFEST_FEATURES);
+ source->LoadJSON(IDR_CHROME_EXTENSION_MANIFEST_FEATURES);
+ } else if (name == "permission") {
+ source->LoadJSON(IDR_EXTENSION_PERMISSION_FEATURES);
+ source->LoadJSON(IDR_CHROME_EXTENSION_PERMISSION_FEATURES);
+ } else {
+ NOTREACHED();
+ source.reset();
+ }
+ return source.Pass();
}
void ChromeExtensionsClient::FilterHostPermissions(
diff --git a/chrome/common/extensions/chrome_extensions_client.h b/chrome/common/extensions/chrome_extensions_client.h
index 39a10a9..ce88bba 100644
--- a/chrome/common/extensions/chrome_extensions_client.h
+++ b/chrome/common/extensions/chrome_extensions_client.h
@@ -28,6 +28,8 @@ class ChromeExtensionsClient : public ExtensionsClient {
OVERRIDE;
virtual scoped_ptr<FeatureProvider> CreateFeatureProvider(
const std::string& name) const OVERRIDE;
+ virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource(
+ const std::string& name) const OVERRIDE;
virtual void FilterHostPermissions(
const URLPatternSet& hosts,
URLPatternSet* new_hosts,
diff --git a/extensions/DEPS b/extensions/DEPS
index 9d6a6a0..0fc52ca 100644
--- a/extensions/DEPS
+++ b/extensions/DEPS
@@ -13,7 +13,6 @@ include_rules = [
#
# TODO(jamescook): Remove these. http://crbug.com/162530
"!chrome/browser/chrome_notification_types.h",
- "!grit/common_resources.h",
'!grit/extensions_api_resources.h',
# This is needed for renderer JS sources which should eventually move to
# the extensions_resources target.
diff --git a/extensions/common/extension_api.cc b/extensions/common/extension_api.cc
index f2483b9..4d6b6ec 100644
--- a/extensions/common/extension_api.cc
+++ b/extensions/common/extension_api.cc
@@ -22,7 +22,6 @@
#include "extensions/common/features/feature_provider.h"
#include "extensions/common/permissions/permission_set.h"
#include "extensions/common/permissions/permissions_data.h"
-#include "grit/common_resources.h"
#include "grit/extensions_api_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "url/gurl.h"
@@ -266,7 +265,7 @@ void ExtensionAPI::RegisterSchemaResource(const std::string& name,
}
void ExtensionAPI::RegisterDependencyProvider(const std::string& name,
- FeatureProvider* provider) {
+ const FeatureProvider* provider) {
dependency_providers_[name] = provider;
}
diff --git a/extensions/common/extension_api.h b/extensions/common/extension_api.h
index 53906fb..bd2e315 100644
--- a/extensions/common/extension_api.h
+++ b/extensions/common/extension_api.h
@@ -63,7 +63,7 @@ class ExtensionAPI {
void RegisterSchemaResource(const std::string& api_name, int resource_id);
void RegisterDependencyProvider(const std::string& name,
- FeatureProvider* provider);
+ const FeatureProvider* provider);
// Returns true if the API feature |api| and all of its dependencies are
// available in |context|.
@@ -139,7 +139,7 @@ class ExtensionAPI {
SchemaMap schemas_;
// FeatureProviders used for resolving dependencies.
- typedef std::map<std::string, FeatureProvider*> FeatureProviderMap;
+ typedef std::map<std::string, const FeatureProvider*> FeatureProviderMap;
FeatureProviderMap dependency_providers_;
DISALLOW_COPY_AND_ASSIGN(ExtensionAPI);
diff --git a/extensions/common/extensions_client.h b/extensions/common/extensions_client.h
index b3e9892..f0bdc8c 100644
--- a/extensions/common/extensions_client.h
+++ b/extensions/common/extensions_client.h
@@ -19,6 +19,7 @@ namespace extensions {
class APIPermissionSet;
class Extension;
class FeatureProvider;
+class JSONFeatureProviderSource;
class ManifestPermissionSet;
class PermissionMessage;
class PermissionMessageProvider;
@@ -47,6 +48,13 @@ class ExtensionsClient {
virtual scoped_ptr<FeatureProvider> CreateFeatureProvider(
const std::string& name) const = 0;
+ // Create a JSONFeatureProviderSource for a specific feature type,
+ // e.g. "permission". Currently, all features are loaded from
+ // JSONFeatureProviderSources.
+ // This is used primarily in CreateFeatureProvider, above.
+ virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource(
+ const std::string& name) const = 0;
+
// Takes the list of all hosts and filters out those with special
// permission strings. Adds the regular hosts to |new_hosts|,
// and adds the special permission messages to |messages|.
diff --git a/extensions/common/features/base_feature_provider_unittest.cc b/extensions/common/features/base_feature_provider_unittest.cc
index 0d19fd4..28c8ded 100644
--- a/extensions/common/features/base_feature_provider_unittest.cc
+++ b/extensions/common/features/base_feature_provider_unittest.cc
@@ -27,7 +27,7 @@ SimpleFeature* CreateFeature() {
} // namespace
TEST(BaseFeatureProviderTest, ManifestFeatures) {
- FeatureProvider* provider = BaseFeatureProvider::GetByName("manifest");
+ const FeatureProvider* provider = BaseFeatureProvider::GetByName("manifest");
SimpleFeature* feature =
static_cast<SimpleFeature*>(provider->GetFeature("description"));
ASSERT_TRUE(feature);
@@ -70,7 +70,8 @@ TEST(BaseFeatureProviderTest, ManifestFeatures) {
}
TEST(BaseFeatureProviderTest, PermissionFeatures) {
- FeatureProvider* provider = BaseFeatureProvider::GetByName("permission");
+ const FeatureProvider* provider =
+ BaseFeatureProvider::GetByName("permission");
SimpleFeature* feature =
static_cast<SimpleFeature*>(provider->GetFeature("contextMenus"));
ASSERT_TRUE(feature);
diff --git a/extensions/common/features/feature_provider.cc b/extensions/common/features/feature_provider.cc
index b8f21f3..1923836 100644
--- a/extensions/common/features/feature_provider.cc
+++ b/extensions/common/features/feature_provider.cc
@@ -47,22 +47,22 @@ base::LazyInstance<Static> g_static = LAZY_INSTANCE_INITIALIZER;
} // namespace
// static
-FeatureProvider* FeatureProvider::GetByName(const std::string& name) {
+const FeatureProvider* FeatureProvider::GetByName(const std::string& name) {
return g_static.Get().GetFeatures(name);
}
// static
-FeatureProvider* FeatureProvider::GetAPIFeatures() {
+const FeatureProvider* FeatureProvider::GetAPIFeatures() {
return GetByName("api");
}
// static
-FeatureProvider* FeatureProvider::GetManifestFeatures() {
+const FeatureProvider* FeatureProvider::GetManifestFeatures() {
return GetByName("manifest");
}
// static
-FeatureProvider* FeatureProvider::GetPermissionFeatures() {
+const FeatureProvider* FeatureProvider::GetPermissionFeatures() {
return GetByName("permission");
}
diff --git a/extensions/common/features/feature_provider.h b/extensions/common/features/feature_provider.h
index 97f94c65..887cb22 100644
--- a/extensions/common/features/feature_provider.h
+++ b/extensions/common/features/feature_provider.h
@@ -31,12 +31,12 @@ class FeatureProvider {
virtual const std::vector<std::string>& GetAllFeatureNames() const = 0;
// Gets a feature provider for a specific feature type, like "permission".
- static FeatureProvider* GetByName(const std::string& name);
+ static const FeatureProvider* GetByName(const std::string& name);
// Directly access the common feature types.
- static FeatureProvider* GetAPIFeatures();
- static FeatureProvider* GetManifestFeatures();
- static FeatureProvider* GetPermissionFeatures();
+ static const FeatureProvider* GetAPIFeatures();
+ static const FeatureProvider* GetManifestFeatures();
+ static const FeatureProvider* GetPermissionFeatures();
};
} // namespace extensions
diff --git a/extensions/common/manifest.cc b/extensions/common/manifest.cc
index bbf2ff8..37880d4 100644
--- a/extensions/common/manifest.cc
+++ b/extensions/common/manifest.cc
@@ -146,7 +146,7 @@ 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.
- FeatureProvider* manifest_feature_provider =
+ const FeatureProvider* manifest_feature_provider =
FeatureProvider::GetManifestFeatures();
const std::vector<std::string>& feature_names =
manifest_feature_provider->GetAllFeatureNames();
diff --git a/extensions/common/permissions/permissions_data.cc b/extensions/common/permissions/permissions_data.cc
index 65359d9..ae3dd04 100644
--- a/extensions/common/permissions/permissions_data.cc
+++ b/extensions/common/permissions/permissions_data.cc
@@ -119,7 +119,7 @@ bool ParseHelper(Extension* extension,
// Verify feature availability of permissions.
std::vector<APIPermission::ID> to_remove;
- FeatureProvider* permission_features =
+ const FeatureProvider* permission_features =
FeatureProvider::GetPermissionFeatures();
for (APIPermissionSet::const_iterator iter = api_permissions->begin();
iter != api_permissions->end(); ++iter) {
diff --git a/extensions/renderer/api_definitions_natives.cc b/extensions/renderer/api_definitions_natives.cc
index c0dc699..61ea710 100644
--- a/extensions/renderer/api_definitions_natives.cc
+++ b/extensions/renderer/api_definitions_natives.cc
@@ -23,7 +23,7 @@ ApiDefinitionsNatives::ApiDefinitionsNatives(Dispatcher* dispatcher,
void ApiDefinitionsNatives::GetExtensionAPIDefinitionsForTest(
const v8::FunctionCallbackInfo<v8::Value>& args) {
std::vector<std::string> apis;
- FeatureProvider* feature_provider = FeatureProvider::GetAPIFeatures();
+ const FeatureProvider* feature_provider = FeatureProvider::GetAPIFeatures();
const std::vector<std::string>& feature_names =
feature_provider->GetAllFeatureNames();
for (std::vector<std::string>::const_iterator i = feature_names.begin();
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index a3014ed..bba2087 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -73,7 +73,6 @@
#include "extensions/renderer/user_script_slave.h"
#include "extensions/renderer/utils_native_handler.h"
#include "extensions/renderer/v8_context_native_handler.h"
-#include "grit/common_resources.h"
#include "grit/renderer_resources.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
@@ -867,7 +866,8 @@ void Dispatcher::UpdateBindingsForContext(ScriptContext* context) {
case Feature::CONTENT_SCRIPT_CONTEXT: {
// Extension context; iterate through all the APIs and bind the available
// ones.
- FeatureProvider* api_feature_provider = FeatureProvider::GetAPIFeatures();
+ const FeatureProvider* api_feature_provider =
+ FeatureProvider::GetAPIFeatures();
const std::vector<std::string>& apis =
api_feature_provider->GetAllFeatureNames();
for (std::vector<std::string>::const_iterator it = apis.begin();
@@ -1187,7 +1187,8 @@ v8::Handle<v8::Object> Dispatcher::GetOrCreateBindObjectIfAvailable(
// If app is available and app.window is not, just install app.
// If app.window is available and app is not, delete app and install
// app.window on a new object so app does not have to be loaded.
- FeatureProvider* api_feature_provider = FeatureProvider::GetAPIFeatures();
+ const FeatureProvider* api_feature_provider =
+ FeatureProvider::GetAPIFeatures();
std::string ancestor_name;
bool only_ancestor_available = false;
diff --git a/extensions/renderer/test_features_native_handler.cc b/extensions/renderer/test_features_native_handler.cc
index 6e0423d..c27575c 100644
--- a/extensions/renderer/test_features_native_handler.cc
+++ b/extensions/renderer/test_features_native_handler.cc
@@ -6,10 +6,9 @@
#include "base/bind.h"
#include "content/public/renderer/v8_value_converter.h"
+#include "extensions/common/extensions_client.h"
#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/renderer/script_context.h"
-#include "grit/common_resources.h"
-#include "grit/extensions_resources.h"
namespace extensions {
@@ -22,15 +21,12 @@ TestFeaturesNativeHandler::TestFeaturesNativeHandler(ScriptContext* context)
void TestFeaturesNativeHandler::GetAPIFeatures(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- JSONFeatureProviderSource source("api");
- // TODO(rockot): Only inlcude extensions features here. Chrome should add
- // its own native handler for Chrome features.
- source.LoadJSON(IDR_CHROME_EXTENSION_API_FEATURES);
- source.LoadJSON(IDR_EXTENSION_API_FEATURES);
+ scoped_ptr<JSONFeatureProviderSource> source(
+ ExtensionsClient::Get()->CreateFeatureProviderSource("api"));
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
args.GetReturnValue().Set(
- converter->ToV8Value(&source.dictionary(), context()->v8_context()));
+ converter->ToV8Value(&source->dictionary(), context()->v8_context()));
}
} // namespace extensions
diff --git a/extensions/test/test_extensions_client.cc b/extensions/test/test_extensions_client.cc
index 90888a7..7ef0277 100644
--- a/extensions/test/test_extensions_client.cc
+++ b/extensions/test/test_extensions_client.cc
@@ -5,10 +5,11 @@
#include "extensions/test/test_extensions_client.h"
#include "extensions/common/common_manifest_handlers.h"
-#include "extensions/common/features/base_feature_provider.h"
+#include "extensions/common/features/feature_provider.h"
+#include "extensions/common/features/json_feature_provider_source.h"
#include "extensions/common/manifest_handler.h"
+#include "extensions/common/url_pattern_set.h"
#include "extensions/test/test_permission_message_provider.h"
-#include "extensions/test/test_permissions_provider.h"
namespace extensions {
@@ -39,6 +40,13 @@ scoped_ptr<FeatureProvider> TestExtensionsClient::CreateFeatureProvider(
return scoped_ptr<FeatureProvider>();
}
+// TODO(yoz): Implement something reasonable here.
+scoped_ptr<JSONFeatureProviderSource>
+TestExtensionsClient::CreateFeatureProviderSource(
+ const std::string& name) const {
+ return scoped_ptr<JSONFeatureProviderSource>();
+}
+
void TestExtensionsClient::FilterHostPermissions(
const URLPatternSet& hosts,
URLPatternSet* new_hosts,
diff --git a/extensions/test/test_extensions_client.h b/extensions/test/test_extensions_client.h
index 082c7ab..399f43f 100644
--- a/extensions/test/test_extensions_client.h
+++ b/extensions/test/test_extensions_client.h
@@ -21,6 +21,8 @@ class TestExtensionsClient : public ExtensionsClient {
OVERRIDE;
virtual scoped_ptr<FeatureProvider> CreateFeatureProvider(
const std::string& name) const OVERRIDE;
+ virtual scoped_ptr<JSONFeatureProviderSource> CreateFeatureProviderSource(
+ const std::string& name) const OVERRIDE;
virtual void FilterHostPermissions(
const URLPatternSet& hosts,
URLPatternSet* new_hosts,