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

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

Issue 2239273002: Don't use SSLStatus from FrameHostMsg_DidCommitProvisionalLoad and instead cache it on the browser … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 4 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/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 4fb1f971c1fe212231d691b7f3af7e87ce25920e..fed466be31c84c3ed8975cb196e6a8caaf1b6787 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -308,7 +308,7 @@ NavigationHandleImpl::CallWillProcessResponseForTesting(
content::RenderFrameHost* render_frame_host) {
NavigationThrottle::ThrottleCheckResult result = NavigationThrottle::DEFER;
WillProcessResponse(static_cast<RenderFrameHostImpl*>(render_frame_host),
- scoped_refptr<net::HttpResponseHeaders>(),
+ scoped_refptr<net::HttpResponseHeaders>(), SSLStatus(),
base::Bind(&UpdateThrottleCheckResult, &result));
// Reset the callback to ensure it will not be called later.
@@ -389,11 +389,13 @@ void NavigationHandleImpl::WillRedirectRequest(
void NavigationHandleImpl::WillProcessResponse(
RenderFrameHostImpl* render_frame_host,
scoped_refptr<net::HttpResponseHeaders> response_headers,
+ const SSLStatus& ssl_status,
const ThrottleChecksFinishedCallback& callback) {
DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host);
render_frame_host_ = render_frame_host;
response_headers_ = response_headers;
state_ = WILL_PROCESS_RESPONSE;
+ ssl_status_ = ssl_status;
complete_callback_ = callback;
// Notify each throttle of the response.
@@ -437,6 +439,11 @@ void NavigationHandleImpl::DidCommitNavigation(
state_ = net_error_code_ == net::OK ? DID_COMMIT : DID_COMMIT_ERROR_PAGE;
}
+void NavigationHandleImpl::UpdateSSLCertId(int new_cert_id) {
+ DCHECK(ssl_status_.cert_id) << "Must have set an SSL certificate already.";
+ ssl_status_.cert_id = new_cert_id;
+}
+
NavigationThrottle::ThrottleCheckResult
NavigationHandleImpl::CheckWillStartRequest() {
DCHECK(state_ == WILL_SEND_REQUEST || state_ == DEFERRING_START);

Powered by Google App Engine
This is Rietveld 408576698