OLD | NEW |
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 UIChecksPerformedCallback callback = | 305 UIChecksPerformedCallback callback = |
306 base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed, | 306 base::Bind(&NavigationResourceThrottle::OnUIChecksPerformed, |
307 weak_ptr_factory_.GetWeakPtr()); | 307 weak_ptr_factory_.GetWeakPtr()); |
308 base::Closure transfer_callback = | 308 base::Closure transfer_callback = |
309 base::Bind(&NavigationResourceThrottle::InitiateTransfer, | 309 base::Bind(&NavigationResourceThrottle::InitiateTransfer, |
310 weak_ptr_factory_.GetWeakPtr()); | 310 weak_ptr_factory_.GetWeakPtr()); |
311 | 311 |
312 SSLStatus ssl_status; | 312 SSLStatus ssl_status; |
313 if (request_->ssl_info().cert.get()) { | 313 if (request_->ssl_info().cert.get()) { |
314 NavigationResourceHandler::GetSSLStatusForRequest( | 314 NavigationResourceHandler::GetSSLStatusForRequest(request_->ssl_info(), |
315 request_->url(), request_->ssl_info(), info->GetChildID(), &ssl_status); | 315 &ssl_status); |
316 } | 316 } |
317 | 317 |
318 BrowserThread::PostTask( | 318 BrowserThread::PostTask( |
319 BrowserThread::UI, FROM_HERE, | 319 BrowserThread::UI, FROM_HERE, |
320 base::Bind(&WillProcessResponseOnUIThread, callback, render_process_id, | 320 base::Bind(&WillProcessResponseOnUIThread, callback, render_process_id, |
321 render_frame_id, response_headers, | 321 render_frame_id, response_headers, |
322 request_->response_info().connection_info, ssl_status, | 322 request_->response_info().connection_info, ssl_status, |
323 info->GetGlobalRequestID(), | 323 info->GetGlobalRequestID(), |
324 info->should_replace_current_entry(), info->IsDownload(), | 324 info->should_replace_current_entry(), info->IsDownload(), |
325 info->is_stream(), transfer_callback, | 325 info->is_stream(), transfer_callback, |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 | 389 |
390 // If the results of the checks on the UI thread are known, unblock the | 390 // If the results of the checks on the UI thread are known, unblock the |
391 // navigation. Otherwise, wait until the callback has executed. | 391 // navigation. Otherwise, wait until the callback has executed. |
392 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { | 392 if (on_transfer_done_result_ != NavigationThrottle::DEFER) { |
393 OnUIChecksPerformed(on_transfer_done_result_); | 393 OnUIChecksPerformed(on_transfer_done_result_); |
394 on_transfer_done_result_ = NavigationThrottle::DEFER; | 394 on_transfer_done_result_ = NavigationThrottle::DEFER; |
395 } | 395 } |
396 } | 396 } |
397 | 397 |
398 } // namespace content | 398 } // namespace content |
OLD | NEW |