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

Unified Diff: third_party/WebKit/Source/modules/fetch/FetchRequestData.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/modules/fetch/FetchRequestData.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp b/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp
index ef910f5a77f480305916f73e80972baacef04bec..eb72cc11b08dee8be67d136f1b83c126bfc09712 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp
@@ -8,6 +8,7 @@
#include "core/fetch/ResourceLoaderOptions.h"
#include "core/loader/ThreadableLoader.h"
#include "core/streams/ReadableStream.h"
+#include "modules/credentialmanager/PasswordCredential.h"
#include "modules/fetch/BodyStreamBuffer.h"
#include "modules/fetch/DataConsumerHandleUtil.h"
#include "modules/fetch/DataConsumerTee.h"
@@ -60,6 +61,7 @@ FetchRequestData* FetchRequestData::cloneExceptBody()
request->m_responseTainting = m_responseTainting;
request->m_mimeType = m_mimeType;
request->m_integrity = m_integrity;
+ request->m_attachedCredential = m_attachedCredential;
return request;
}
@@ -104,6 +106,14 @@ FetchRequestData::FetchRequestData()
{
}
+
+void FetchRequestData::setCredentials(WebURLRequest::FetchCredentialsMode credentials)
+{
+ m_credentials = credentials;
+ if (m_credentials != WebURLRequest::FetchCredentialsModePassword)
+ m_attachedCredential.clear();
+}
+
DEFINE_TRACE(FetchRequestData)
{
visitor->trace(m_buffer);
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchRequestData.h ('k') | third_party/WebKit/Source/modules/fetch/Request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698