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

Unified Diff: components/subresource_filter/content/renderer/subresource_filter_agent.cc

Issue 2574193002: Make subresource filter activation agnostic of in-page navigations. (Closed)
Patch Set: Final test fix. Created 4 years 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/renderer/subresource_filter_agent.cc
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent.cc b/components/subresource_filter/content/renderer/subresource_filter_agent.cc
index 64b54b01044ffd0639f2251a2a4605fd5b14ecb8..05405c00b9a3b88998bed812659f29d7dc615c96 100644
--- a/components/subresource_filter/content/renderer/subresource_filter_agent.cc
+++ b/components/subresource_filter/content/renderer/subresource_filter_agent.cc
@@ -143,6 +143,9 @@ void SubresourceFilterAgent::DidStartProvisionalLoad() {
void SubresourceFilterAgent::DidCommitProvisionalLoad(
bool is_new_navigation,
bool is_same_page_navigation) {
+ if (is_same_page_navigation)
+ return;
+
RecordHistogramsOnLoadCommitted();
if (activation_state_for_provisional_load_ != ActivationState::DISABLED &&
ruleset_dealer_->IsRulesetAvailable()) {
@@ -159,6 +162,7 @@ void SubresourceFilterAgent::DidCommitProvisionalLoad(
filter_for_last_committed_load_ = filter->AsWeakPtr();
SetSubresourceFilterForCommittedLoad(std::move(filter));
}
+
activation_state_for_provisional_load_ = ActivationState::DISABLED;
}

Powered by Google App Engine
This is Rietveld 408576698