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_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 send_start_time_ = base::TimeTicks::Now(); | 818 send_start_time_ = base::TimeTicks::Now(); |
819 next_state_ = STATE_SEND_REQUEST_COMPLETE; | 819 next_state_ = STATE_SEND_REQUEST_COMPLETE; |
820 | 820 |
821 return stream_->SendRequest(request_headers_, &response_, io_callback_); | 821 return stream_->SendRequest(request_headers_, &response_, io_callback_); |
822 } | 822 } |
823 | 823 |
824 int HttpNetworkTransaction::DoSendRequestComplete(int result) { | 824 int HttpNetworkTransaction::DoSendRequestComplete(int result) { |
825 send_end_time_ = base::TimeTicks::Now(); | 825 send_end_time_ = base::TimeTicks::Now(); |
826 if (result < 0) | 826 if (result < 0) |
827 return HandleIOError(result); | 827 return HandleIOError(result); |
| 828 response_.network_accessed = true; |
828 next_state_ = STATE_READ_HEADERS; | 829 next_state_ = STATE_READ_HEADERS; |
829 return OK; | 830 return OK; |
830 } | 831 } |
831 | 832 |
832 int HttpNetworkTransaction::DoReadHeaders() { | 833 int HttpNetworkTransaction::DoReadHeaders() { |
833 next_state_ = STATE_READ_HEADERS_COMPLETE; | 834 next_state_ = STATE_READ_HEADERS_COMPLETE; |
834 return stream_->ReadResponseHeaders(io_callback_); | 835 return stream_->ReadResponseHeaders(io_callback_); |
835 } | 836 } |
836 | 837 |
837 int HttpNetworkTransaction::HandleConnectionClosedBeforeEndOfHeaders() { | 838 int HttpNetworkTransaction::HandleConnectionClosedBeforeEndOfHeaders() { |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1429 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1429 state); | 1430 state); |
1430 break; | 1431 break; |
1431 } | 1432 } |
1432 return description; | 1433 return description; |
1433 } | 1434 } |
1434 | 1435 |
1435 #undef STATE_CASE | 1436 #undef STATE_CASE |
1436 | 1437 |
1437 } // namespace net | 1438 } // namespace net |
OLD | NEW |