| 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 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 return session_->IsQuicEnabled() && | 802 return session_->IsQuicEnabled() && |
| 803 (base::ContainsKey(session_->params().origins_to_force_quic_on, | 803 (base::ContainsKey(session_->params().origins_to_force_quic_on, |
| 804 HostPortPair()) || | 804 HostPortPair()) || |
| 805 base::ContainsKey(session_->params().origins_to_force_quic_on, | 805 base::ContainsKey(session_->params().origins_to_force_quic_on, |
| 806 destination_)) && | 806 destination_)) && |
| 807 proxy_info_.is_direct() && origin_url_.SchemeIs(url::kHttpsScheme); | 807 proxy_info_.is_direct() && origin_url_.SchemeIs(url::kHttpsScheme); |
| 808 } | 808 } |
| 809 | 809 |
| 810 int HttpStreamFactoryImpl::Job::DoWait() { | 810 int HttpStreamFactoryImpl::Job::DoWait() { |
| 811 next_state_ = STATE_WAIT_COMPLETE; | 811 next_state_ = STATE_WAIT_COMPLETE; |
| 812 if (delegate_->ShouldWait(this)) | 812 bool should_wait = delegate_->ShouldWait(this); |
| 813 net_log_.BeginEvent(NetLogEventType::HTTP_STREAM_JOB_WAITING, |
| 814 NetLog::BoolCallback("should_wait", should_wait)); |
| 815 if (should_wait) |
| 813 return ERR_IO_PENDING; | 816 return ERR_IO_PENDING; |
| 814 | 817 |
| 815 return OK; | 818 return OK; |
| 816 } | 819 } |
| 817 | 820 |
| 818 int HttpStreamFactoryImpl::Job::DoWaitComplete(int result) { | 821 int HttpStreamFactoryImpl::Job::DoWaitComplete(int result) { |
| 822 net_log_.EndEvent(NetLogEventType::HTTP_STREAM_JOB_WAITING); |
| 819 DCHECK_EQ(OK, result); | 823 DCHECK_EQ(OK, result); |
| 820 next_state_ = STATE_INIT_CONNECTION; | 824 next_state_ = STATE_INIT_CONNECTION; |
| 821 return OK; | 825 return OK; |
| 822 } | 826 } |
| 823 | 827 |
| 824 int HttpStreamFactoryImpl::Job::DoInitConnection() { | 828 int HttpStreamFactoryImpl::Job::DoInitConnection() { |
| 825 int result = DoInitConnectionImpl(); | 829 int result = DoInitConnectionImpl(); |
| 826 if (result != ERR_SPDY_SESSION_ALREADY_EXISTS) | 830 if (result != ERR_SPDY_SESSION_ALREADY_EXISTS) |
| 827 delegate_->OnConnectionInitialized(this, result); | 831 delegate_->OnConnectionInitialized(this, result); |
| 828 | 832 |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 | 1538 |
| 1535 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1539 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
| 1536 if (connection_->socket()) { | 1540 if (connection_->socket()) { |
| 1537 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1541 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1538 } | 1542 } |
| 1539 | 1543 |
| 1540 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1544 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
| 1541 } | 1545 } |
| 1542 | 1546 |
| 1543 } // namespace net | 1547 } // namespace net |
| OLD | NEW |