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

Unified Diff: Source/core/css/CSSImageValue.cpp

Issue 137983010: (Re)organize handling of CORS access control during resource loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: HTMLImportLoader no longer needs a ResourceFetcher 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/css/CSSImageValue.h ('k') | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSImageValue.cpp
diff --git a/Source/core/css/CSSImageValue.cpp b/Source/core/css/CSSImageValue.cpp
index e34050cb3142cf1f97cc111b1efbcc4d2077c237..146402f5c52b93ed3615429fe7f750169a2fe4f8 100644
--- a/Source/core/css/CSSImageValue.cpp
+++ b/Source/core/css/CSSImageValue.cpp
@@ -60,7 +60,7 @@ StyleImage* CSSImageValue::cachedOrPendingImage()
return m_image.get();
}
-StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const ResourceLoaderOptions& options, CORSEnabled corsEnabled)
+StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const ResourceLoaderOptions& options)
{
ASSERT(fetcher);
@@ -69,8 +69,8 @@ StyleFetchedImage* CSSImageValue::cachedImage(ResourceFetcher* fetcher, const Re
FetchRequest request(ResourceRequest(m_url), m_initiatorName.isEmpty() ? FetchInitiatorTypeNames::css : m_initiatorName, options);
- if (corsEnabled == PotentiallyCORSEnabled)
- updateRequestForAccessControl(request.mutableResourceRequest(), fetcher->document()->securityOrigin(), options.allowCredentials);
+ if (options.corsEnabled == IsCORSEnabled)
+ request.setCrossOriginAccessControl(fetcher->document()->securityOrigin(), options.allowCredentials);
if (ResourcePtr<ImageResource> cachedImage = fetcher->fetchImage(request))
m_image = StyleFetchedImage::create(cachedImage.get());
« no previous file with comments | « Source/core/css/CSSImageValue.h ('k') | Source/core/css/resolver/StyleResourceLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698