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

Side by Side Diff: third_party/WebKit/Source/core/loader/TextTrackLoader.cpp

Issue 2731953002: Don't double-resolve URL in TextTrackLoader::load (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (!m_cueLoadTimer.isActive()) 118 if (!m_cueLoadTimer.isActive())
119 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE); 119 m_cueLoadTimer.startOneShot(0, BLINK_FROM_HERE);
120 120
121 cancelLoad(); 121 cancelLoad();
122 } 122 }
123 123
124 bool TextTrackLoader::load(const KURL& url, 124 bool TextTrackLoader::load(const KURL& url,
125 CrossOriginAttributeValue crossOrigin) { 125 CrossOriginAttributeValue crossOrigin) {
126 cancelLoad(); 126 cancelLoad();
127 127
128 FetchRequest cueRequest(ResourceRequest(document().completeURL(url)), 128 FetchRequest cueRequest(ResourceRequest(url),
129 FetchInitiatorTypeNames::texttrack); 129 FetchInitiatorTypeNames::texttrack);
130 130
131 if (crossOrigin != CrossOriginAttributeNotSet) { 131 if (crossOrigin != CrossOriginAttributeNotSet) {
132 cueRequest.setCrossOriginAccessControl(document().getSecurityOrigin(), 132 cueRequest.setCrossOriginAccessControl(document().getSecurityOrigin(),
133 crossOrigin); 133 crossOrigin);
134 } else if (!document().getSecurityOrigin()->canRequestNoSuborigin(url)) { 134 } else if (!document().getSecurityOrigin()->canRequestNoSuborigin(url)) {
135 // Text track elements without 'crossorigin' set on the parent are "No 135 // Text track elements without 'crossorigin' set on the parent are "No
136 // CORS"; report error if not same-origin. 136 // CORS"; report error if not same-origin.
137 corsPolicyPreventedLoad(document().getSecurityOrigin(), url); 137 corsPolicyPreventedLoad(document().getSecurityOrigin(), url);
138 return false; 138 return false;
(...skipping 29 matching lines...) Expand all
168 168
169 DEFINE_TRACE(TextTrackLoader) { 169 DEFINE_TRACE(TextTrackLoader) {
170 visitor->trace(m_client); 170 visitor->trace(m_client);
171 visitor->trace(m_cueParser); 171 visitor->trace(m_cueParser);
172 visitor->trace(m_document); 172 visitor->trace(m_document);
173 ResourceOwner<RawResource>::trace(visitor); 173 ResourceOwner<RawResource>::trace(visitor);
174 VTTParserClient::trace(visitor); 174 VTTParserClient::trace(visitor);
175 } 175 }
176 176
177 } // namespace blink 177 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698