diff options
Diffstat (limited to 'extensions/test/test_extensions_client.cc')
-rw-r--r-- | extensions/test/test_extensions_client.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/extensions/test/test_extensions_client.cc b/extensions/test/test_extensions_client.cc index bc3fd49..bd64c58 100644 --- a/extensions/test/test_extensions_client.cc +++ b/extensions/test/test_extensions_client.cc @@ -4,6 +4,7 @@ #include "extensions/test/test_extensions_client.h" +#include "base/stl_util.h" #include "extensions/common/api/generated_schemas.h" #include "extensions/common/common_manifest_handlers.h" #include "extensions/common/extension_urls.h" @@ -38,6 +39,16 @@ TestExtensionsClient::TestExtensionsClient() { TestExtensionsClient::~TestExtensionsClient() { } +void TestExtensionsClient::AddBrowserImagePathsFilter( + BrowserImagePathsFilter* filter) { + browser_image_filters_.insert(filter); +} + +void TestExtensionsClient::RemoveBrowserImagePathsFilter( + BrowserImagePathsFilter* filter) { + browser_image_filters_.erase(filter); +} + void TestExtensionsClient::Initialize() { // Registration could already be finalized in unit tests, where the utility // thread runs in-process. @@ -167,4 +178,13 @@ bool TestExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const { return true; } +std::set<base::FilePath> TestExtensionsClient::GetBrowserImagePaths( + const Extension* extension) { + std::set<base::FilePath> result = + ExtensionsClient::GetBrowserImagePaths(extension); + for (auto filter : browser_image_filters_) + filter->Filter(extension, &result); + return result; +} + } // namespace extensions |