Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Unified Diff: net/url_request/certificate_report_sender.cc

Issue 1267383002: Allow preloaded pins to contain report URIs; remove special-case reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase fixup Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/certificate_report_sender.h ('k') | net/url_request/fraudulent_certificate_reporter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0ff637bc47227383048669bb60af87d2d4939827 100644
--- a/net/url_request/certificate_report_sender.cc
+++ b/net/url_request/certificate_report_sender.cc
@@ -28,7 +28,15 @@ 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 |= 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 +64,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
« no previous file with comments | « net/url_request/certificate_report_sender.h ('k') | net/url_request/fraudulent_certificate_reporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698