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

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

Issue 1269813002: Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: Addressed comments Created 5 years, 3 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 f1d2f8ed608f59c5b9019f757d2a14d5e8f044a0..0fcf917be019fb413e693f9ace395f442efea80d 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -22,6 +22,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_handle_factory.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"
@@ -907,7 +908,7 @@ void RenderFrameHostImpl::OnDidCommitProvisionalLoad(const IPC::Message& msg) {
// DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad
// message.
if (!navigation_handle_) {
- navigation_handle_ = NavigationHandleImpl::Create(
+ navigation_handle_ = NavigationHandleFactory::Create(
validated_params.url, frame_tree_node_->IsMainFrame(),
frame_tree_node_->navigator()->GetDelegate());
}
@@ -1358,8 +1359,11 @@ void RenderFrameHostImpl::OnBeginNavigation(
scoped_refptr<ResourceRequestBody> body) {
CHECK(base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserSideNavigation));
+ // Filter the url.
nasko 2015/09/16 20:33:39 nit: a redundant comment.
clamy 2015/09/17 01:18:33 Done.
+ CommonNavigationParams validated_params = common_params;
+ GetProcess()->FilterURL(false, &validated_params.url);
frame_tree_node()->navigator()->OnBeginNavigation(
- frame_tree_node(), common_params, begin_params, body);
+ frame_tree_node(), validated_params, begin_params, body);
}
void RenderFrameHostImpl::OnDispatchLoad() {

Powered by Google App Engine
This is Rietveld 408576698