| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/field_trial.h" | 9 #include "base/field_trial.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 392 } |
| 393 | 393 |
| 394 uint64 HttpNetworkTransaction::GetUploadProgress() const { | 394 uint64 HttpNetworkTransaction::GetUploadProgress() const { |
| 395 if (!request_body_stream_.get()) | 395 if (!request_body_stream_.get()) |
| 396 return 0; | 396 return 0; |
| 397 | 397 |
| 398 return request_body_stream_->position(); | 398 return request_body_stream_->position(); |
| 399 } | 399 } |
| 400 | 400 |
| 401 HttpNetworkTransaction::~HttpNetworkTransaction() { | 401 HttpNetworkTransaction::~HttpNetworkTransaction() { |
| 402 // If we still have an open socket, then make sure to disconnect it so we | 402 // If we still have an open socket, then make sure to disconnect it so it |
| 403 // don't try to reuse it later on. | 403 // won't call us back and we don't try to reuse it later on. |
| 404 if (connection_.is_initialized()) | 404 if (connection_.is_initialized()) |
| 405 connection_.socket()->Disconnect(); | 405 connection_.socket()->Disconnect(); |
| 406 | 406 |
| 407 if (pac_request_) | 407 if (pac_request_) |
| 408 session_->proxy_service()->CancelPacRequest(pac_request_); | 408 session_->proxy_service()->CancelPacRequest(pac_request_); |
| 409 } | 409 } |
| 410 | 410 |
| 411 void HttpNetworkTransaction::DoCallback(int rv) { | 411 void HttpNetworkTransaction::DoCallback(int rv) { |
| 412 DCHECK(rv != ERR_IO_PENDING); | 412 DCHECK(rv != ERR_IO_PENDING); |
| 413 DCHECK(user_callback_); | 413 DCHECK(user_callback_); |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 host_and_port = proxy_info_.proxy_server().host_and_port(); | 1757 host_and_port = proxy_info_.proxy_server().host_and_port(); |
| 1758 } else { | 1758 } else { |
| 1759 DCHECK(target == HttpAuth::AUTH_SERVER); | 1759 DCHECK(target == HttpAuth::AUTH_SERVER); |
| 1760 host_and_port = GetHostAndPort(request_->url); | 1760 host_and_port = GetHostAndPort(request_->url); |
| 1761 } | 1761 } |
| 1762 auth_info->host_and_port = ASCIIToWide(host_and_port); | 1762 auth_info->host_and_port = ASCIIToWide(host_and_port); |
| 1763 response_.auth_challenge = auth_info; | 1763 response_.auth_challenge = auth_info; |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 } // namespace net | 1766 } // namespace net |
| OLD | NEW |