| Index: net/http/http_network_transaction.cc
|
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
|
| index e825fb2e667e0c166deb32b07d883f6da9993344..8409ac16ad6d04f43715b0640ee72c6a42df05cc 100644
|
| --- a/net/http/http_network_transaction.cc
|
| +++ b/net/http/http_network_transaction.cc
|
| @@ -46,6 +46,7 @@
|
| #include "net/http/http_server_properties.h"
|
| #include "net/http/http_status_code.h"
|
| #include "net/http/http_stream_factory.h"
|
| +#include "net/http/http_transaction_delegate.h"
|
| #include "net/http/http_util.h"
|
| #include "net/http/url_security_manager.h"
|
| #include "net/socket/client_socket_factory.h"
|
| @@ -122,7 +123,8 @@ HttpNetworkTransaction::HttpNetworkTransaction(HttpNetworkSession* session)
|
| request_headers_(),
|
| read_buf_len_(0),
|
| next_state_(STATE_NONE),
|
| - establishing_tunnel_(false) {
|
| + establishing_tunnel_(false),
|
| + delegate_(NULL) {
|
| session->ssl_config_service()->GetSSLConfig(&server_ssl_config_);
|
| if (session->http_stream_factory()->has_next_protos()) {
|
| server_ssl_config_.next_protos =
|
| @@ -748,7 +750,10 @@ int HttpNetworkTransaction::DoBuildRequest() {
|
| if (request_->upload_data) {
|
| request_body_.reset(new UploadDataStream(request_->upload_data));
|
| const int error_code = request_body_->Init();
|
| - if (error_code != OK) {
|
| + if (error_code == OK) {
|
| + if (delegate_)
|
| + delegate_->OnRequestBodyInitialized(request_body_->size());
|
| + } else {
|
| request_body_.reset(NULL);
|
| return error_code;
|
| }
|
|
|