| Index: chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
| diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc b/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
| index 4a8afd516ad84d99b7018ee4c4dc8120ca6183ee..be0df93b39eadbe8498fccd26223e02bb0d76d54 100644
|
| --- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
| +++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h"
|
|
|
| +#include <string>
|
| +
|
| #include "base/metrics/histogram_macros.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| @@ -53,3 +55,15 @@ bool ChromeSubresourceFilterClient::IsWhitelistedByContentSettings(
|
| std::string());
|
| return setting == CONTENT_SETTING_BLOCK;
|
| }
|
| +
|
| +void ChromeSubresourceFilterClient::WhitelistByContentSettings(
|
| + const GURL& url) {
|
| + Profile* profile =
|
| + Profile::FromBrowserContext(web_contents_->GetBrowserContext());
|
| + DCHECK(profile);
|
| + HostContentSettingsMap* settings_map =
|
| + HostContentSettingsMapFactory::GetForProfile(profile);
|
| + settings_map->SetContentSettingDefaultScope(
|
| + url, url, ContentSettingsType::CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER,
|
| + std::string(), CONTENT_SETTING_BLOCK);
|
| +}
|
|
|