| Index: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
|
| diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
|
| index 7819037198433436b92b1b69ac6d22110ef3ca41..410b37382d6f5b76f56cd82d171adc47089cce45 100644
|
| --- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
|
| +++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h"
|
|
|
| +#include "base/feature_list.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/rand_util.h"
|
| #include "base/time/time.h"
|
| @@ -197,7 +198,16 @@ void ContentSubresourceFilterDriverFactory::ActivateForFrameHostIfNeeded(
|
| void ContentSubresourceFilterDriverFactory::OnReloadRequested() {
|
| UMA_HISTOGRAM_BOOLEAN("SubresourceFilter.Prompt.NumReloads", true);
|
| const GURL& whitelist_url = web_contents()->GetLastCommittedURL();
|
| - AddHostOfURLToWhitelistSet(whitelist_url);
|
| +
|
| + // Only whitelist via content settings when using the experimental UI,
|
| + // otherwise could get into a situation where content settings cannot be
|
| + // adjusted.
|
| + if (base::FeatureList::IsEnabled(
|
| + subresource_filter::kSafeBrowsingSubresourceFilterExperimentalUI)) {
|
| + client_->WhitelistByContentSettings(whitelist_url);
|
| + } else {
|
| + AddHostOfURLToWhitelistSet(whitelist_url);
|
| + }
|
| web_contents()->GetController().Reload(content::ReloadType::NORMAL, true);
|
| }
|
|
|
|
|