| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <string> | 8 #include <string> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 44 #include "net/socket/ssl_client_socket.h" | 44 #include "net/socket/ssl_client_socket.h" | 
| 45 #include "net/socket/ssl_client_socket_pool.h" | 45 #include "net/socket/ssl_client_socket_pool.h" | 
| 46 #include "net/spdy/bidirectional_stream_spdy_impl.h" | 46 #include "net/spdy/bidirectional_stream_spdy_impl.h" | 
| 47 #include "net/spdy/spdy_http_stream.h" | 47 #include "net/spdy/spdy_http_stream.h" | 
| 48 #include "net/spdy/spdy_protocol.h" | 48 #include "net/spdy/spdy_protocol.h" | 
| 49 #include "net/spdy/spdy_session.h" | 49 #include "net/spdy/spdy_session.h" | 
| 50 #include "net/spdy/spdy_session_pool.h" | 50 #include "net/spdy/spdy_session_pool.h" | 
| 51 #include "net/ssl/channel_id_service.h" | 51 #include "net/ssl/channel_id_service.h" | 
| 52 #include "net/ssl/ssl_cert_request_info.h" | 52 #include "net/ssl/ssl_cert_request_info.h" | 
| 53 #include "net/ssl/ssl_connection_status_flags.h" | 53 #include "net/ssl/ssl_connection_status_flags.h" | 
| 54 #include "net/ssl/ssl_failure_state.h" |  | 
| 55 | 54 | 
| 56 namespace net { | 55 namespace net { | 
| 57 | 56 | 
| 58 namespace { | 57 namespace { | 
| 59 | 58 | 
| 60 void DoNothingAsyncCallback(int result){}; | 59 void DoNothingAsyncCallback(int result){}; | 
| 61 void RecordChannelIDKeyMatch(SSLClientSocket* ssl_socket, | 60 void RecordChannelIDKeyMatch(SSLClientSocket* ssl_socket, | 
| 62                              ChannelIDService* channel_id_service, | 61                              ChannelIDService* channel_id_service, | 
| 63                              std::string host) { | 62                              std::string host) { | 
| 64   SSLInfo ssl_info; | 63   SSLInfo ssl_info; | 
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 466   delegate_->OnNewSpdySessionReady(this, spdy_session, spdy_session_direct_); | 465   delegate_->OnNewSpdySessionReady(this, spdy_session, spdy_session_direct_); | 
| 467 | 466 | 
| 468   // |this| may be deleted after this call. | 467   // |this| may be deleted after this call. | 
| 469 } | 468 } | 
| 470 | 469 | 
| 471 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) { | 470 void HttpStreamFactoryImpl::Job::OnStreamFailedCallback(int result) { | 
| 472   DCHECK_NE(job_type_, PRECONNECT); | 471   DCHECK_NE(job_type_, PRECONNECT); | 
| 473 | 472 | 
| 474   MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 473   MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 
| 475 | 474 | 
| 476   SSLFailureState ssl_failure_state = | 475   delegate_->OnStreamFailed(this, result, server_ssl_config_); | 
| 477       connection_ ? connection_->ssl_failure_state() : SSL_FAILURE_NONE; |  | 
| 478 |  | 
| 479   delegate_->OnStreamFailed(this, result, server_ssl_config_, |  | 
| 480                             ssl_failure_state); |  | 
| 481   // |this| may be deleted after this call. | 476   // |this| may be deleted after this call. | 
| 482 } | 477 } | 
| 483 | 478 | 
| 484 void HttpStreamFactoryImpl::Job::OnCertificateErrorCallback( | 479 void HttpStreamFactoryImpl::Job::OnCertificateErrorCallback( | 
| 485     int result, const SSLInfo& ssl_info) { | 480     int result, const SSLInfo& ssl_info) { | 
| 486   DCHECK_NE(job_type_, PRECONNECT); | 481   DCHECK_NE(job_type_, PRECONNECT); | 
| 487 | 482 | 
| 488   MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 483   MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 
| 489 | 484 | 
| 490   delegate_->OnCertificateError(this, result, server_ssl_config_, ssl_info); | 485   delegate_->OnCertificateError(this, result, server_ssl_config_, ssl_info); | 
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1731 | 1726 | 
| 1732   ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1727   ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 
| 1733   if (connection_->socket()) { | 1728   if (connection_->socket()) { | 
| 1734     connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1729     connection_->socket()->GetConnectionAttempts(&socket_attempts); | 
| 1735   } | 1730   } | 
| 1736 | 1731 | 
| 1737   delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1732   delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 
| 1738 } | 1733 } | 
| 1739 | 1734 | 
| 1740 }  // namespace net | 1735 }  // namespace net | 
| OLD | NEW | 
|---|