Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Unified Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc

Issue 2890253002: [subresource_filter] Move OnReloadRequested to the ChromeClient (Closed)
Patch Set: rebase on #473448 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 51b9ccea3b6c86fa3cf20ee2f5579be065db16cc..09b402af04159c2f2e9be958f15546f6b2f93b59 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,9 +4,7 @@
#include "components/subresource_filter/content/browser/content_subresource_filter_driver_factory.h"
-#include "base/feature_list.h"
#include "base/memory/ptr_util.h"
-#include "base/metrics/histogram_macros.h"
#include "base/rand_util.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
@@ -216,22 +214,6 @@ bool ContentSubresourceFilterDriverFactory::
return false;
}
-void ContentSubresourceFilterDriverFactory::OnReloadRequested() {
- UMA_HISTOGRAM_BOOLEAN("SubresourceFilter.Prompt.NumReloads", true);
- const GURL& whitelist_url = web_contents()->GetLastCommittedURL();
-
- // 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 {
- client_->WhitelistInCurrentWebContents(whitelist_url);
- }
- web_contents()->GetController().Reload(content::ReloadType::NORMAL, true);
-}
-
void ContentSubresourceFilterDriverFactory::OnFirstSubresourceLoadDisallowed() {
if (activation_options_.should_suppress_notifications)
return;

Powered by Google App Engine
This is Rietveld 408576698