| Index: net/url_request/report_sender.cc
|
| diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
|
| index 76f171d116a7e68fd19911b0edeace9d99f3ff5a..f52b7f81c26380e017508e34c6d3eb41ffc56ed9 100644
|
| --- a/net/url_request/report_sender.cc
|
| +++ b/net/url_request/report_sender.cc
|
| @@ -45,6 +45,11 @@ void ReportSender::Send(const GURL& report_uri, const std::string& report) {
|
|
|
| url_request->set_method("POST");
|
|
|
| + if (!content_type_.empty()) {
|
| + url_request->SetExtraRequestHeaderByName(HttpRequestHeaders::kContentType,
|
| + content_type_, true);
|
| + }
|
| +
|
| std::unique_ptr<UploadElementReader> reader(
|
| UploadOwnedBytesElementReader::CreateWithString(report));
|
| url_request->set_upload(
|
| @@ -55,6 +60,10 @@ void ReportSender::Send(const GURL& report_uri, const std::string& report) {
|
| raw_url_request->Start();
|
| }
|
|
|
| +void ReportSender::SetContentTypeHeader(const std::string& content_type) {
|
| + content_type_ = content_type;
|
| +}
|
| +
|
| void ReportSender::SetErrorCallback(const ErrorCallback& error_callback) {
|
| error_callback_ = error_callback;
|
| }
|
|
|