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

Side by Side Diff: content/browser/loader/navigation_resource_throttle.cc

Issue 2954623003: PlzNavigate: implement REUSE_COMMITTED_OR_PENDING_SITE for redirects (Closed)
Patch Set: Addressed Charlie's comments Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/loader/navigation_resource_throttle.h" 5 #include "content/browser/loader/navigation_resource_throttle.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 NavigationHandleImpl* navigation_handle = 128 NavigationHandleImpl* navigation_handle =
129 FindNavigationHandle(render_process_id, render_frame_host_id, callback); 129 FindNavigationHandle(render_process_id, render_frame_host_id, callback);
130 if (!navigation_handle) 130 if (!navigation_handle)
131 return; 131 return;
132 132
133 GURL new_validated_url(new_url); 133 GURL new_validated_url(new_url);
134 RenderProcessHost::FromID(render_process_id) 134 RenderProcessHost::FromID(render_process_id)
135 ->FilterURL(false, &new_validated_url); 135 ->FilterURL(false, &new_validated_url);
136 navigation_handle->WillRedirectRequest( 136 navigation_handle->WillRedirectRequest(
137 new_validated_url, new_method, new_referrer_url, new_is_external_protocol, 137 new_validated_url, new_method, new_referrer_url, new_is_external_protocol,
138 headers, connection_info, 138 headers, connection_info, nullptr,
139 base::Bind(&SendCheckResultToIOThread, callback)); 139 base::Bind(&SendCheckResultToIOThread, callback));
140 } 140 }
141 141
142 void WillProcessResponseOnUIThread( 142 void WillProcessResponseOnUIThread(
143 UIChecksPerformedCallback callback, 143 UIChecksPerformedCallback callback,
144 int render_process_id, 144 int render_process_id,
145 int render_frame_host_id, 145 int render_frame_host_id,
146 scoped_refptr<net::HttpResponseHeaders> headers, 146 scoped_refptr<net::HttpResponseHeaders> headers,
147 net::HttpResponseInfo::ConnectionInfo connection_info, 147 net::HttpResponseInfo::ConnectionInfo connection_info,
148 const SSLStatus& ssl_status, 148 const SSLStatus& ssl_status,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 // If the results of the checks on the UI thread are known, unblock the 391 // If the results of the checks on the UI thread are known, unblock the
392 // navigation. Otherwise, wait until the callback has executed. 392 // navigation. Otherwise, wait until the callback has executed.
393 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { 393 if (on_transfer_done_result_ != NavigationThrottle::DEFER) {
394 OnUIChecksPerformed(on_transfer_done_result_); 394 OnUIChecksPerformed(on_transfer_done_result_);
395 on_transfer_done_result_ = NavigationThrottle::DEFER; 395 on_transfer_done_result_ = NavigationThrottle::DEFER;
396 } 396 }
397 } 397 }
398 398
399 } // namespace content 399 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/renderer_host/render_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698