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

Unified Diff: Source/core/fetch/FetchRequest.cpp

Issue 135723008: Add CORS support for <link> elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add setCrossOriginAccessControl() helper to avoid repetition matching CORS attribute value Created 6 years, 11 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 | « Source/core/fetch/FetchRequest.h ('k') | Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/FetchRequest.cpp
diff --git a/Source/core/fetch/FetchRequest.cpp b/Source/core/fetch/FetchRequest.cpp
index 391396b1dc58d39bfcc19e8645e5d1e05e2d72ee..4ec40ccf5ac06c21107dc29dbc83a7dc07e2ef1b 100644
--- a/Source/core/fetch/FetchRequest.cpp
+++ b/Source/core/fetch/FetchRequest.cpp
@@ -75,4 +75,11 @@ void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, StoredCre
m_options.corsEnabled = IsCORSEnabled;
}
+void FetchRequest::setCrossOriginAccessControl(SecurityOrigin* origin, const AtomicString& crossOriginMode)
+{
+ StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials;
+ updateRequestForAccessControl(m_resourceRequest, origin, allowCredentials);
+ m_options.corsEnabled = IsCORSEnabled;
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/fetch/FetchRequest.h ('k') | Source/core/html/HTMLLinkElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698