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

Unified Diff: third_party/WebKit/Source/core/loader/TextTrackLoader.cpp

Issue 1487343002: Set credentials mode "same-origin" when crossOrigin=anonymous is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 | « third_party/WebKit/Source/core/loader/TextTrackLoader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp b/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
index 3c1216bea6fc3d34a18c3bb16549cb6e5c5b45dc..ef84e2f0d18e07b1f97d8406842eeb014f7c3e30 100644
--- a/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/TextTrackLoader.cpp
@@ -105,14 +105,14 @@ void TextTrackLoader::notifyFinished(Resource* resource)
cancelLoad();
}
-bool TextTrackLoader::load(const KURL& url, const AtomicString& crossOriginMode)
+bool TextTrackLoader::load(const KURL& url, CrossOriginAttributeValue crossOrigin)
{
cancelLoad();
FetchRequest cueRequest(ResourceRequest(document().completeURL(url)), FetchInitiatorTypeNames::texttrack);
- if (!crossOriginMode.isNull()) {
- cueRequest.setCrossOriginAccessControl(document().securityOrigin(), crossOriginMode);
+ if (crossOrigin != CrossOriginAttributeNotSet) {
+ cueRequest.setCrossOriginAccessControl(document().securityOrigin(), crossOrigin);
} else if (!document().securityOrigin()->canRequestNoSuborigin(url)) {
// Text track elements without 'crossorigin' set on the parent are "No CORS"; report error if not same-origin.
corsPolicyPreventedLoad(document().securityOrigin(), url);
« no previous file with comments | « third_party/WebKit/Source/core/loader/TextTrackLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698