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

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

Issue 1350913008: Revert of Add a NavigationThrottle to the public content/ interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-api
Patch Set: 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
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 8247f3553bf4e565da455c8230695b3d93d091de..a99074f2ce3aeb56440b44cc0e9530f0f0c1db39 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -14,7 +14,6 @@
#include "content/browser/site_instance_impl.h"
#include "content/common/resource_request_body.h"
#include "content/public/browser/navigation_controller.h"
-#include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/common/content_client.h"
#include "net/base/load_flags.h"
@@ -180,20 +179,6 @@
state_ = STARTED;
if (ShouldMakeNetworkRequestForURL(common_params_.url)) {
- // TODO(clamy): pass the real value for |is_external_protocol| if needed.
- NavigationThrottle::ThrottleCheckResult result =
- navigation_handle_->WillStartRequest(
- begin_params_.method == "POST",
- Referrer::SanitizeForRequest(common_params_.url,
- common_params_.referrer),
- begin_params_.has_user_gesture, common_params_.transition, false);
-
- // Abort the request if needed. This will destroy the NavigationRequest.
- if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
- frame_tree_node_->ResetNavigationRequest(false);
- return false;
- }
-
loader_ = NavigationURLLoader::Create(
frame_tree_node_->navigator()->GetController()->GetBrowserContext(),
frame_tree_node_->frame_tree_node_id(), info_.Pass(), this);
@@ -224,24 +209,12 @@
void NavigationRequest::OnRequestRedirected(
const net::RedirectInfo& redirect_info,
const scoped_refptr<ResourceResponse>& response) {
+ // TODO(davidben): Track other changes from redirects. These are important
+ // for, e.g., reloads.
common_params_.url = redirect_info.new_url;
- begin_params_.method = redirect_info.new_method;
- common_params_.referrer.url = GURL(redirect_info.new_referrer);
-
- // TODO(clamy): Have CSP + security upgrade checks here.
- // TODO(clamy): Kill the renderer if FilterURL fails?
- // TODO(clamy): pass the real value for |is_external_protocol| if needed.
- NavigationThrottle::ThrottleCheckResult result =
- navigation_handle_->WillRedirectRequest(
- common_params_.url, begin_params_.method == "POST",
- common_params_.referrer.url, false);
-
- // Abort the request if needed. This will destroy the NavigationRequest.
- if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
- frame_tree_node_->ResetNavigationRequest(false);
- return;
- }
-
+
+ // TODO(davidben): This where prerender and navigation_interceptor should be
+ // integrated. For now, just always follow all redirects.
loader_->FollowRedirect();
navigation_handle_->DidRedirectNavigation(redirect_info.new_url);
« no previous file with comments | « content/browser/frame_host/navigation_request.h ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698