Index: net/url_request/certificate_report_sender.cc |
diff --git a/net/url_request/certificate_report_sender.cc b/net/url_request/certificate_report_sender.cc |
index fd5d11c163da3570ad916b32ef3876e3408fe28a..350050ff201d10e56bb2b33e23c2d7a3201b92fc 100644 |
--- a/net/url_request/certificate_report_sender.cc |
+++ b/net/url_request/certificate_report_sender.cc |
@@ -28,7 +28,16 @@ CertificateReportSender::~CertificateReportSender() { |
void CertificateReportSender::Send(const GURL& report_uri, |
const std::string& report) { |
scoped_ptr<URLRequest> url_request = |
- CreateURLRequest(request_context_, report_uri); |
+ request_context_->CreateRequest(report_uri, DEFAULT_PRIORITY, this); |
+ |
+ int load_flags = |
+ LOAD_BYPASS_CACHE | LOAD_DISABLE_CACHE | LOAD_DO_NOT_SEND_AUTH_DATA; |
+ if (cookies_preference_ != SEND_COOKIES) { |
+ load_flags = |
agl
2015/08/07 23:10:01
this can use the |= operator.
estark
2015/08/10 05:34:26
Done.
|
+ load_flags | LOAD_DO_NOT_SEND_COOKIES | LOAD_DO_NOT_SAVE_COOKIES; |
+ } |
+ url_request->SetLoadFlags(load_flags); |
+ |
url_request->set_method("POST"); |
scoped_ptr<UploadElementReader> reader( |
@@ -56,19 +65,4 @@ void CertificateReportSender::OnReadCompleted(URLRequest* request, |
NOTREACHED(); |
} |
-scoped_ptr<URLRequest> CertificateReportSender::CreateURLRequest( |
- URLRequestContext* context, |
- const GURL& report_uri) { |
- scoped_ptr<URLRequest> request = |
- context->CreateRequest(report_uri, DEFAULT_PRIORITY, this); |
- int load_flags = |
- LOAD_BYPASS_CACHE | LOAD_DISABLE_CACHE | LOAD_DO_NOT_SEND_AUTH_DATA; |
- if (cookies_preference_ != SEND_COOKIES) { |
- load_flags = |
- load_flags | LOAD_DO_NOT_SEND_COOKIES | LOAD_DO_NOT_SAVE_COOKIES; |
- } |
- request->SetLoadFlags(load_flags); |
- return request.Pass(); |
-} |
- |
} // namespace net |