OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/field_trial.h" | 8 #include "base/field_trial.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/histogram.h" | 10 #include "base/histogram.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 TRACE_EVENT_BEGIN("http.read_headers", request_, request_->url.spec()); | 576 TRACE_EVENT_BEGIN("http.read_headers", request_, request_->url.spec()); |
577 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS); | 577 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS); |
578 rv = DoReadHeaders(); | 578 rv = DoReadHeaders(); |
579 break; | 579 break; |
580 case STATE_READ_HEADERS_COMPLETE: | 580 case STATE_READ_HEADERS_COMPLETE: |
581 rv = DoReadHeadersComplete(rv); | 581 rv = DoReadHeadersComplete(rv); |
582 TRACE_EVENT_END("http.read_headers", request_, request_->url.spec()); | 582 TRACE_EVENT_END("http.read_headers", request_, request_->url.spec()); |
583 net_log_.EndEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS); | 583 net_log_.EndEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_HEADERS); |
584 break; | 584 break; |
585 case STATE_RESOLVE_CANONICAL_NAME: | 585 case STATE_RESOLVE_CANONICAL_NAME: |
| 586 DCHECK_EQ(OK, rv); |
| 587 net_log_.BeginEvent( |
| 588 NetLog::TYPE_HTTP_TRANSACTION_RESOLVE_CANONICAL_NAME); |
586 rv = DoResolveCanonicalName(); | 589 rv = DoResolveCanonicalName(); |
587 break; | 590 break; |
588 case STATE_RESOLVE_CANONICAL_NAME_COMPLETE: | 591 case STATE_RESOLVE_CANONICAL_NAME_COMPLETE: |
589 rv = DoResolveCanonicalNameComplete(rv); | 592 rv = DoResolveCanonicalNameComplete(rv); |
| 593 net_log_.EndEvent(NetLog::TYPE_HTTP_TRANSACTION_RESOLVE_CANONICAL_NAME); |
590 break; | 594 break; |
591 case STATE_READ_BODY: | 595 case STATE_READ_BODY: |
592 DCHECK_EQ(OK, rv); | 596 DCHECK_EQ(OK, rv); |
593 TRACE_EVENT_BEGIN("http.read_body", request_, request_->url.spec()); | 597 TRACE_EVENT_BEGIN("http.read_body", request_, request_->url.spec()); |
594 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_BODY); | 598 net_log_.BeginEvent(NetLog::TYPE_HTTP_TRANSACTION_READ_BODY); |
595 rv = DoReadBody(); | 599 rv = DoReadBody(); |
596 break; | 600 break; |
597 case STATE_READ_BODY_COMPLETE: | 601 case STATE_READ_BODY_COMPLETE: |
598 rv = DoReadBodyComplete(rv); | 602 rv = DoReadBodyComplete(rv); |
599 TRACE_EVENT_END("http.read_body", request_, request_->url.spec()); | 603 TRACE_EVENT_END("http.read_body", request_, request_->url.spec()); |
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1968 http_host_port_pair); | 1972 http_host_port_pair); |
1969 | 1973 |
1970 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; | 1974 alternate_protocol_mode_ = kDoNotUseAlternateProtocol; |
1971 if (connection_->socket()) | 1975 if (connection_->socket()) |
1972 connection_->socket()->Disconnect(); | 1976 connection_->socket()->Disconnect(); |
1973 connection_->Reset(); | 1977 connection_->Reset(); |
1974 next_state_ = STATE_INIT_CONNECTION; | 1978 next_state_ = STATE_INIT_CONNECTION; |
1975 } | 1979 } |
1976 | 1980 |
1977 } // namespace net | 1981 } // namespace net |
OLD | NEW |