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

Unified Diff: components/subresource_filter/content/browser/content_subresource_filter_driver_factory.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/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 e7b47a523771fc1aa624353330e4402bf89600ce..084bdf5fc7ef41e99624f0561452b31f00e77345 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
@@ -157,7 +157,7 @@ ContentSubresourceFilterDriverFactory::DriverFromFrameHost(
void ContentSubresourceFilterDriverFactory::DidStartNavigation(
content::NavigationHandle* navigation_handle) {
- if (navigation_handle->IsInMainFrame()) {
+ if (navigation_handle->IsInMainFrame() && !navigation_handle->IsSamePage()) {
navigation_chain_.clear();
activation_list_matches_.clear();
navigation_chain_.push_back(navigation_handle->GetURL());
@@ -184,6 +184,7 @@ void ContentSubresourceFilterDriverFactory::RenderFrameDeleted(
void ContentSubresourceFilterDriverFactory::ReadyToCommitNavigation(
content::NavigationHandle* navigation_handle) {
+ DCHECK(!navigation_handle->IsSamePage());
content::RenderFrameHost* render_frame_host =
navigation_handle->GetRenderFrameHost();
GURL url = navigation_handle->GetURL();

Powered by Google App Engine
This is Rietveld 408576698