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

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

Issue 2661743002: PlzNavigate: Invoke didStartProvisionalLoad() when the renderer initiates a navigation in startLoad( (Closed)
Patch Set: Rebased to tip Created 3 years, 11 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/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 b2982b6ac2dc59555fe7e57f6166620795a00cbe..bb9359a6974226839d7a36e70f511fc1377580e2 100644
--- a/components/subresource_filter/content/renderer/subresource_filter_agent.cc
+++ b/components/subresource_filter/content/renderer/subresource_filter_agent.cc
@@ -131,18 +131,16 @@ void SubresourceFilterAgent::OnDestruct() {
delete this;
}
-void SubresourceFilterAgent::DidStartProvisionalLoad() {
+void SubresourceFilterAgent::DidStartProvisionalLoad(
+ blink::WebDataSource* data_source) {
// With PlzNavigate, DidStartProvisionalLoad and DidCommitProvisionalLoad will
// both be called in response to the one commit IPC from the browser. That
// means that they will come after OnActivateForProvisionalLoad. So we have to
// have extra logic to check that the response to OnActivateForProvisionalLoad
// isn't removed in that case.
- blink::WebDataSource* ds =
- render_frame() ? render_frame()->GetWebFrame()->provisionalDataSource()
- : nullptr;
if (!content::IsBrowserSideNavigationEnabled() ||
- (!ds ||
- static_cast<GURL>(ds->getRequest().url()) !=
+ (!data_source ||
+ static_cast<GURL>(data_source->getRequest().url()) !=
url_for_provisional_load_)) {
activation_level_for_provisional_load_ = ActivationLevel::DISABLED;
measure_performance_ = false;

Powered by Google App Engine
This is Rietveld 408576698