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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1964863002: Persist prompt/block download limiter state on renderer-initiated loads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding subframe limiter test Created 4 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
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 1ede0de1aa818b3242d2f0e711990de4b278896a..5a952970ac8865eb5574a36cc224b116fcdb409b 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -29,6 +29,7 @@
#include "content/browser/frame_host/frame_mojo_shell.h"
#include "content/browser/frame_host/frame_tree.h"
#include "content/browser/frame_host/frame_tree_node.h"
+#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/navigation_request.h"
#include "content/browser/frame_host/navigator.h"
@@ -1093,12 +1094,14 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// for these navigations should go away when this is properly handled. See
// crbug.com/588317.
int entry_id_for_data_nav = 0;
+ bool is_renderer_initiated = true;
if (navigation_handle_ &&
(navigation_handle_->GetURL() != validated_params.url)) {
// Make sure that the pending entry was really loaded via
// LoadDataWithBaseURL and that it matches this handle.
- NavigationEntry* pending_entry =
- frame_tree_node()->navigator()->GetController()->GetPendingEntry();
+ NavigationEntryImpl* pending_entry =
+ NavigationEntryImpl::FromNavigationEntry(
+ frame_tree_node()->navigator()->GetController()->GetPendingEntry());
bool pending_entry_matches_handle =
pending_entry &&
pending_entry->GetUniqueID() ==
@@ -1110,6 +1113,7 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
pending_entry_matches_handle &&
!pending_entry->GetBaseURLForDataURL().is_empty()) {
entry_id_for_data_nav = navigation_handle_->pending_nav_entry_id();
+ is_renderer_initiated = pending_entry->is_renderer_initiated();
}
navigation_handle_.reset();
}
@@ -1123,6 +1127,7 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// loaded via LoadDataWithBaseURL, propogate the entry id.
navigation_handle_ = NavigationHandleImpl::Create(
validated_params.url, frame_tree_node_,
+ is_renderer_initiated,
true, // is_synchronous
validated_params.is_srcdoc, base::TimeTicks::Now(),
entry_id_for_data_nav);
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698