| 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 &request_headers_); | 740 &request_headers_); |
| 741 | 741 |
| 742 request_headers_.MergeFrom(request_->extra_headers); | 742 request_headers_.MergeFrom(request_->extra_headers); |
| 743 } | 743 } |
| 744 | 744 |
| 745 int HttpNetworkTransaction::DoBuildRequest() { | 745 int HttpNetworkTransaction::DoBuildRequest() { |
| 746 next_state_ = STATE_BUILD_REQUEST_COMPLETE; | 746 next_state_ = STATE_BUILD_REQUEST_COMPLETE; |
| 747 request_body_.reset(NULL); | 747 request_body_.reset(NULL); |
| 748 if (request_->upload_data) { | 748 if (request_->upload_data) { |
| 749 request_body_.reset(new UploadDataStream(request_->upload_data)); | 749 request_body_.reset(new UploadDataStream(request_->upload_data)); |
| 750 const int error_code = request_body_->Init(); | 750 const int error_code = request_body_->InitSync(); |
| 751 if (error_code != OK) { | 751 if (error_code != OK) { |
| 752 request_body_.reset(NULL); | 752 request_body_.reset(NULL); |
| 753 return error_code; | 753 return error_code; |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 | 756 |
| 757 headers_valid_ = false; | 757 headers_valid_ = false; |
| 758 | 758 |
| 759 // This is constructed lazily (instead of within our Start method), so that | 759 // This is constructed lazily (instead of within our Start method), so that |
| 760 // we have proxy info available. | 760 // we have proxy info available. |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, | 1414 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, |
| 1415 state); | 1415 state); |
| 1416 break; | 1416 break; |
| 1417 } | 1417 } |
| 1418 return description; | 1418 return description; |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 #undef STATE_CASE | 1421 #undef STATE_CASE |
| 1422 | 1422 |
| 1423 } // namespace net | 1423 } // namespace net |
| OLD | NEW |