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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 send_start_time_ = base::TimeTicks::Now(); | 815 send_start_time_ = base::TimeTicks::Now(); |
816 next_state_ = STATE_SEND_REQUEST_COMPLETE; | 816 next_state_ = STATE_SEND_REQUEST_COMPLETE; |
817 | 817 |
818 return stream_->SendRequest(request_headers_, &response_, io_callback_); | 818 return stream_->SendRequest(request_headers_, &response_, io_callback_); |
819 } | 819 } |
820 | 820 |
821 int HttpNetworkTransaction::DoSendRequestComplete(int result) { | 821 int HttpNetworkTransaction::DoSendRequestComplete(int result) { |
822 send_end_time_ = base::TimeTicks::Now(); | 822 send_end_time_ = base::TimeTicks::Now(); |
823 if (result < 0) | 823 if (result < 0) |
824 return HandleIOError(result); | 824 return HandleIOError(result); |
| 825 response_.network_accessed = true; |
825 next_state_ = STATE_READ_HEADERS; | 826 next_state_ = STATE_READ_HEADERS; |
826 return OK; | 827 return OK; |
827 } | 828 } |
828 | 829 |
829 int HttpNetworkTransaction::DoReadHeaders() { | 830 int HttpNetworkTransaction::DoReadHeaders() { |
830 next_state_ = STATE_READ_HEADERS_COMPLETE; | 831 next_state_ = STATE_READ_HEADERS_COMPLETE; |
831 return stream_->ReadResponseHeaders(io_callback_); | 832 return stream_->ReadResponseHeaders(io_callback_); |
832 } | 833 } |
833 | 834 |
834 int HttpNetworkTransaction::HandleConnectionClosedBeforeEndOfHeaders() { | 835 int HttpNetworkTransaction::HandleConnectionClosedBeforeEndOfHeaders() { |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1464 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
1464 state); | 1465 state); |
1465 break; | 1466 break; |
1466 } | 1467 } |
1467 return description; | 1468 return description; |
1468 } | 1469 } |
1469 | 1470 |
1470 #undef STATE_CASE | 1471 #undef STATE_CASE |
1471 | 1472 |
1472 } // namespace net | 1473 } // namespace net |
OLD | NEW |