| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 proxy_info_.proxy_server().is_https(); | 379 proxy_info_.proxy_server().is_https(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void HttpStreamFactoryImpl::Job::OnStreamReadyCallback() { | 382 void HttpStreamFactoryImpl::Job::OnStreamReadyCallback() { |
| 383 DCHECK(stream_.get()); | 383 DCHECK(stream_.get()); |
| 384 DCHECK_NE(job_type_, PRECONNECT); | 384 DCHECK_NE(job_type_, PRECONNECT); |
| 385 DCHECK(!delegate_->for_websockets()); | 385 DCHECK(!delegate_->for_websockets()); |
| 386 | 386 |
| 387 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 387 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
| 388 | 388 |
| 389 delegate_->OnStreamReady(this, server_ssl_config_, proxy_info_); | 389 delegate_->OnStreamReady(this, server_ssl_config_); |
| 390 // |this| may be deleted after this call. | 390 // |this| may be deleted after this call. |
| 391 } | 391 } |
| 392 | 392 |
| 393 void HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() { | 393 void HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() { |
| 394 DCHECK(websocket_stream_); | 394 DCHECK(websocket_stream_); |
| 395 DCHECK_NE(job_type_, PRECONNECT); | 395 DCHECK_NE(job_type_, PRECONNECT); |
| 396 DCHECK(delegate_->for_websockets()); | 396 DCHECK(delegate_->for_websockets()); |
| 397 | 397 |
| 398 MaybeCopyConnectionAttemptsFromSocketOrHandle(); | 398 MaybeCopyConnectionAttemptsFromSocketOrHandle(); |
| 399 | 399 |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1505 | 1505 |
| 1506 ConnectionAttempts socket_attempts = connection_->connection_attempts(); | 1506 ConnectionAttempts socket_attempts = connection_->connection_attempts(); |
| 1507 if (connection_->socket()) { | 1507 if (connection_->socket()) { |
| 1508 connection_->socket()->GetConnectionAttempts(&socket_attempts); | 1508 connection_->socket()->GetConnectionAttempts(&socket_attempts); |
| 1509 } | 1509 } |
| 1510 | 1510 |
| 1511 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); | 1511 delegate_->AddConnectionAttemptsToRequest(this, socket_attempts); |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 } // namespace net | 1514 } // namespace net |
| OLD | NEW |