| Index: net/http/http_stream_parser.cc
|
| diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc
|
| index 23208877a0f1b2d423206f556d5a55a545f32937..47a51c23b5d5c0067435c466d737fe9e43cae368 100644
|
| --- a/net/http/http_stream_parser.cc
|
| +++ b/net/http/http_stream_parser.cc
|
| @@ -74,16 +74,16 @@ bool HeadersContainMultipleCopiesOfField(const HttpResponseHeaders& headers,
|
| return false;
|
| }
|
|
|
| -base::Value* NetLogSendRequestBodyCallback(
|
| +scoped_ptr<base::Value> NetLogSendRequestBodyCallback(
|
| uint64 length,
|
| bool is_chunked,
|
| bool did_merge,
|
| NetLogCaptureMode /* capture_mode */) {
|
| - base::DictionaryValue* dict = new base::DictionaryValue();
|
| + scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| dict->SetInteger("length", static_cast<int>(length));
|
| dict->SetBoolean("is_chunked", is_chunked);
|
| dict->SetBoolean("did_merge", did_merge);
|
| - return dict;
|
| + return dict.Pass();
|
| }
|
|
|
| // Returns true if |error_code| is an error for which we give the server a
|
| @@ -294,12 +294,11 @@ int HttpStreamParser::SendRequest(const std::string& request_line,
|
| request_headers_->SetOffset(0);
|
| did_merge = true;
|
|
|
| - net_log_.AddEvent(
|
| - NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
|
| - base::Bind(&NetLogSendRequestBodyCallback,
|
| - request_->upload_data_stream->size(),
|
| - false, /* not chunked */
|
| - true /* merged */));
|
| + net_log_.AddEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
|
| + base::Bind(NetLogSendRequestBodyCallback,
|
| + request_->upload_data_stream->size(),
|
| + false, /* not chunked */
|
| + true /* merged */));
|
| }
|
|
|
| if (!did_merge) {
|
| @@ -481,12 +480,11 @@ int HttpStreamParser::DoSendHeadersComplete(int result) {
|
| // !IsEOF() indicates that the body wasn't merged.
|
| (request_->upload_data_stream->size() > 0 &&
|
| !request_->upload_data_stream->IsEOF()))) {
|
| - net_log_.AddEvent(
|
| - NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
|
| - base::Bind(&NetLogSendRequestBodyCallback,
|
| - request_->upload_data_stream->size(),
|
| - request_->upload_data_stream->is_chunked(),
|
| - false /* not merged */));
|
| + net_log_.AddEvent(NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_BODY,
|
| + base::Bind(NetLogSendRequestBodyCallback,
|
| + request_->upload_data_stream->size(),
|
| + request_->upload_data_stream->is_chunked(),
|
| + false /* not merged */));
|
| io_state_ = STATE_SEND_BODY;
|
| return OK;
|
| }
|
|
|