Commit b63f3349 authored by David Benjamin's avatar David Benjamin Committed by Commit Bot

Use set_allow_credentials instead of LOAD_DO_NOT_* in net/reporting

This CL comes with a behavior change: set_allow_credentials(false)
additionally sets LOAD_DO_NOT_SEND_AUTH_DATA. However, this would only
matter if the origin server actually used HTTP auth.

Bug: 799935
Change-Id: I764586d72b69c1a24d4981a4a5ba1127bf4e91aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1752622
Commit-Queue: David Benjamin <davidben@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Auto-Submit: David Benjamin <davidben@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686556}
parent f379f2f9
......@@ -169,9 +169,8 @@ class ReportingUploaderImpl : public ReportingUploader, URLRequest::Delegate {
upload->request->set_method("OPTIONS");
upload->request->SetLoadFlags(LOAD_DISABLE_CACHE |
LOAD_DO_NOT_SAVE_COOKIES |
LOAD_DO_NOT_SEND_COOKIES);
upload->request->SetLoadFlags(LOAD_DISABLE_CACHE);
upload->request->set_allow_credentials(false);
upload->request->SetExtraRequestHeaderByName(
HttpRequestHeaders::kOrigin, upload->report_origin.Serialize(), true);
......@@ -201,9 +200,8 @@ class ReportingUploaderImpl : public ReportingUploader, URLRequest::Delegate {
upload->request->set_method("POST");
upload->request->SetLoadFlags(LOAD_DISABLE_CACHE |
LOAD_DO_NOT_SAVE_COOKIES |
LOAD_DO_NOT_SEND_COOKIES);
upload->request->SetLoadFlags(LOAD_DISABLE_CACHE);
upload->request->set_allow_credentials(false);
upload->request->SetExtraRequestHeaderByName(
HttpRequestHeaders::kContentType, kUploadContentType, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment