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

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: clear attachedcredentials 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..b0f0327ae3544e65dfa570ab8aed0a517dd42996 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->attachedCredential())
+ return WebHTTPBody(m_private->m_resourceRequest->attachedCredential());
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::attachedCredential() const
+{
+ return WebHTTPBody(m_private->m_resourceRequest->attachedCredential());
+}
+
+void WebURLRequest::setAttachedCredential(const WebHTTPBody& attachedCredential)
+{
+ m_private->m_resourceRequest->setAttachedCredential(attachedCredential);
+}
+
bool WebURLRequest::reportUploadProgress() const
{
return m_private->m_resourceRequest->reportUploadProgress();
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/RequestInit.cpp ('k') | third_party/WebKit/Source/platform/network/ResourceRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698