| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 next_state_ = STATE_WAITING_USER_ACTION; | 468 next_state_ = STATE_WAITING_USER_ACTION; |
| 469 base::MessageLoop::current()->PostTask( | 469 base::MessageLoop::current()->PostTask( |
| 470 FROM_HERE, | 470 FROM_HERE, |
| 471 base::Bind(&HttpStreamFactoryImpl::Job::OnCertificateErrorCallback, | 471 base::Bind(&HttpStreamFactoryImpl::Job::OnCertificateErrorCallback, |
| 472 ptr_factory_.GetWeakPtr(), result, ssl_info_)); | 472 ptr_factory_.GetWeakPtr(), result, ssl_info_)); |
| 473 return ERR_IO_PENDING; | 473 return ERR_IO_PENDING; |
| 474 } | 474 } |
| 475 | 475 |
| 476 switch (result) { | 476 switch (result) { |
| 477 case ERR_PROXY_AUTH_REQUESTED: { | 477 case ERR_PROXY_AUTH_REQUESTED: { |
| 478 DCHECK(connection_.get()); | 478 CHECK(connection_.get()); |
| 479 DCHECK(connection_->socket()); | 479 CHECK(connection_->socket()); |
| 480 DCHECK(establishing_tunnel_); | 480 CHECK(establishing_tunnel_); |
| 481 | 481 |
| 482 next_state_ = STATE_WAITING_USER_ACTION; | 482 next_state_ = STATE_WAITING_USER_ACTION; |
| 483 ProxyClientSocket* proxy_socket = | 483 ProxyClientSocket* proxy_socket = |
| 484 static_cast<ProxyClientSocket*>(connection_->socket()); | 484 static_cast<ProxyClientSocket*>(connection_->socket()); |
| 485 base::MessageLoop::current()->PostTask( | 485 base::MessageLoop::current()->PostTask( |
| 486 FROM_HERE, | 486 FROM_HERE, |
| 487 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(), | 487 base::Bind(&Job::OnNeedsProxyAuthCallback, ptr_factory_.GetWeakPtr(), |
| 488 *proxy_socket->GetConnectResponseInfo(), | 488 *proxy_socket->GetConnectResponseInfo(), |
| 489 proxy_socket->GetAuthController())); | 489 proxy_socket->GetAuthController())); |
| 490 return ERR_IO_PENDING; | 490 return ERR_IO_PENDING; |
| (...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | | 1490 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | |
| 1491 net::LOAD_IS_DOWNLOAD)) { | 1491 net::LOAD_IS_DOWNLOAD)) { |
| 1492 // Avoid pipelining resources that may be streamed for a long time. | 1492 // Avoid pipelining resources that may be streamed for a long time. |
| 1493 return false; | 1493 return false; |
| 1494 } | 1494 } |
| 1495 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( | 1495 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( |
| 1496 *http_pipelining_key_.get()); | 1496 *http_pipelining_key_.get()); |
| 1497 } | 1497 } |
| 1498 | 1498 |
| 1499 } // namespace net | 1499 } // namespace net |
| OLD | NEW |