| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
| 6 | 6 |
| 7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/trace_event.h" | 10 #include "base/trace_event.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 414 |
| 415 int HttpNetworkTransaction::DoInitConnectionComplete(int result) { | 415 int HttpNetworkTransaction::DoInitConnectionComplete(int result) { |
| 416 if (result < 0) | 416 if (result < 0) |
| 417 return result; | 417 return result; |
| 418 | 418 |
| 419 DCHECK(connection_.is_initialized()); | 419 DCHECK(connection_.is_initialized()); |
| 420 | 420 |
| 421 // Set the reused_socket_ flag to indicate that we are using a keep-alive | 421 // Set the reused_socket_ flag to indicate that we are using a keep-alive |
| 422 // connection. This flag is used to handle errors that occur while we are | 422 // connection. This flag is used to handle errors that occur while we are |
| 423 // trying to reuse a keep-alive connection. | 423 // trying to reuse a keep-alive connection. |
| 424 if (reused_socket_ = (connection_.socket() != NULL)) { | 424 reused_socket_ = (connection_.socket() != NULL); |
| 425 if (reused_socket_) { |
| 425 next_state_ = STATE_WRITE_HEADERS; | 426 next_state_ = STATE_WRITE_HEADERS; |
| 426 } else { | 427 } else { |
| 427 next_state_ = STATE_RESOLVE_HOST; | 428 next_state_ = STATE_RESOLVE_HOST; |
| 428 } | 429 } |
| 429 return OK; | 430 return OK; |
| 430 } | 431 } |
| 431 | 432 |
| 432 int HttpNetworkTransaction::DoResolveHost() { | 433 int HttpNetworkTransaction::DoResolveHost() { |
| 433 next_state_ = STATE_RESOLVE_HOST_COMPLETE; | 434 next_state_ = STATE_RESOLVE_HOST_COMPLETE; |
| 434 | 435 |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 auth_data_[target]->state = AUTH_STATE_NEED_AUTH; | 1083 auth_data_[target]->state = AUTH_STATE_NEED_AUTH; |
| 1083 } | 1084 } |
| 1084 | 1085 |
| 1085 response_.auth_challenge.swap(auth_info); | 1086 response_.auth_challenge.swap(auth_info); |
| 1086 auth_handler_[target].reset(auth_handler.release()); | 1087 auth_handler_[target].reset(auth_handler.release()); |
| 1087 | 1088 |
| 1088 return OK; | 1089 return OK; |
| 1089 } | 1090 } |
| 1090 | 1091 |
| 1091 } // namespace net | 1092 } // namespace net |
| OLD | NEW |