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

Unified Diff: third_party/WebKit/Source/platform/exported/WebURLRequest.cpp

Issue 1844053003: CREDENTIAL: Rework the integration with Fetch (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ? Created 4 years, 8 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
Index: third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
diff --git a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
index a4f16141a182e92da6d4ffe3c89283379e620e33..9ada47013020f3d406deba1131e0839fa81b7253 100644
--- a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
@@ -208,6 +208,12 @@ void WebURLRequest::visitHTTPHeaderFields(WebHTTPHeaderVisitor* visitor) const
WebHTTPBody WebURLRequest::httpBody() const
{
+ // TODO(mkwst): This is wrong, as it means that we're producing the body
+ // before any ServiceWorker has a chance to operate, which means we're
+ // revealing data to the SW that we ought to be hiding. Baby steps.
+ // https://crbug.com/599597
+ if (m_private->m_resourceRequest->attachedCredentialBody())
+ return WebHTTPBody(m_private->m_resourceRequest->attachedCredentialBody());
return WebHTTPBody(m_private->m_resourceRequest->httpBody());
}
@@ -216,6 +222,16 @@ void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody)
m_private->m_resourceRequest->setHTTPBody(httpBody);
}
+WebHTTPBody WebURLRequest::attachedCredentialBody() const
+{
+ return WebHTTPBody(m_private->m_resourceRequest->attachedCredentialBody());
+}
+
+void WebURLRequest::setAttachedCredentialBody(const WebHTTPBody& attachedCredentialBody)
+{
+ m_private->m_resourceRequest->setAttachedCredentialBody(attachedCredentialBody);
+}
+
bool WebURLRequest::reportUploadProgress() const
{
return m_private->m_resourceRequest->reportUploadProgress();

Powered by Google App Engine
This is Rietveld 408576698