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

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: Implement DidFinishNavigation 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
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 de78df1b008a679665336147ce250c5ad9bf3a98..9037c9c3cd7b0cb65281bbf81c5a05fa0b02a2a3 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"
@@ -1060,12 +1061,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 = false;
Charlie Reis 2016/05/11 21:50:04 As before, better assume true unless we know other
clamy 2016/05/12 04:04:44 In this case is_renderer_initiated _really_ has to
dominickn 2016/05/12 04:22:58 Done.
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() ==
@@ -1077,6 +1080,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();
}
@@ -1090,6 +1094,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);

Powered by Google App Engine
This is Rietveld 408576698